-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(tests) tests to fixtures - regexpConstructors (#762)
* refactor(tests) tests to fixtures - regexpConstructors * address review comments
- Loading branch information
1 parent
e6a189c
commit cf9a0da
Showing
24 changed files
with
34 additions
and
148 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
.../babel-plugin-transform-regexp-constructors/__tests__/fixtures/const-references/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const foo = "ab+"; | ||
const bar = "c\\w"; | ||
const flags = "g"; | ||
const ret = new RegExp(foo + bar + "d", flags); |
4 changes: 4 additions & 0 deletions
4
...abel-plugin-transform-regexp-constructors/__tests__/fixtures/const-references/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const foo = "ab+"; | ||
const bar = "c\\w"; | ||
const flags = "g"; | ||
const ret = /ab+c\wd/g; |
1 change: 1 addition & 0 deletions
1
...ages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/empty-string/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp(""); |
1 change: 1 addition & 0 deletions
1
...es/babel-plugin-transform-regexp-constructors/__tests__/fixtures/empty-string/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /(?:)/; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/escape/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp("\\w+\\s"); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/escape/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /\w+\s/; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/expressions/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp(foo(), "g"); |
1 change: 1 addition & 0 deletions
1
...ges/babel-plugin-transform-regexp-constructors/__tests__/fixtures/expressions/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp(foo(), "g"); |
2 changes: 2 additions & 0 deletions
2
...ges/babel-plugin-transform-regexp-constructors/__tests__/fixtures/forward-slash/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var x = new RegExp("/x/"); | ||
var y = new RegExp("\\/"); |
2 changes: 2 additions & 0 deletions
2
...s/babel-plugin-transform-regexp-constructors/__tests__/fixtures/forward-slash/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var x = /\/x\//; | ||
var y = /\//; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/newline/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp("\\n"); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/newline/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /\n/; |
1 change: 1 addition & 0 deletions
1
...ages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/no-arguments/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp(); |
1 change: 1 addition & 0 deletions
1
...es/babel-plugin-transform-regexp-constructors/__tests__/fixtures/no-arguments/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /(?:)/; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/null/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp("\0"); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/null/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /\0/; |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/string/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var x = new RegExp("ab+c"); | ||
var y = new RegExp("ab+c", "gimuy"); |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/string/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
var x = /ab+c/; | ||
var y = /ab+c/gimuy; |
1 change: 1 addition & 0 deletions
1
...s/babel-plugin-transform-regexp-constructors/__tests__/fixtures/unicode-newline/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp("\u2028\u2029"); |
1 change: 1 addition & 0 deletions
1
...babel-plugin-transform-regexp-constructors/__tests__/fixtures/unicode-newline/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /\u2028\u2029/; |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regexp-constructors/__tests__/fixtures/whitespaces/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = new RegExp("\b\f\v\t\r\n\n"); |
1 change: 1 addition & 0 deletions
1
...ges/babel-plugin-transform-regexp-constructors/__tests__/fixtures/whitespaces/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var x = /[\b]\f\v \r\n\n/; |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-regexp-constructors/__tests__/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const runner = require("test-runner"); | ||
runner(__dirname); |
148 changes: 0 additions & 148 deletions
148
...abel-plugin-transform-regexp-constructors/__tests__/transform-regexp-constructors-test.js
This file was deleted.
Oops, something went wrong.