-
-
Notifications
You must be signed in to change notification settings - Fork 222
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 - mergeSiblingVars
- Loading branch information
1 parent
7f4dc3d
commit 3a3522d
Showing
26 changed files
with
81 additions
and
145 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...ransform-merge-sibling-variables/__tests__/fixtures/concat-block-scoped-outside/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,3 @@ | ||
let i = 0; | ||
let y = 0; | ||
for (let x = 0; x < 10; x++) console.log(i + x); |
4 changes: 4 additions & 0 deletions
4
...nsform-merge-sibling-variables/__tests__/fixtures/concat-block-scoped-outside/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 @@ | ||
let i = 0, | ||
y = 0; | ||
|
||
for (let x = 0; x < 10; x++) console.log(i + x); |
3 changes: 3 additions & 0 deletions
3
...plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/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,3 @@ | ||
var i = 0; | ||
var j = 0; | ||
for (var x = 0; x < 10; x++) console.log(i + x); |
1 change: 1 addition & 0 deletions
1
...ugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var-for-loop/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 @@ | ||
for (var i = 0, j = 0, x = 0; x < 10; x++) console.log(i + x); |
3 changes: 3 additions & 0 deletions
3
...es/babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var/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,3 @@ | ||
var i = 0; | ||
var x = 0; | ||
var y = 0; |
3 changes: 3 additions & 0 deletions
3
.../babel-plugin-transform-merge-sibling-variables/__tests__/fixtures/concat-var/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,3 @@ | ||
var i = 0, | ||
x = 0, | ||
y = 0; |
3 changes: 3 additions & 0 deletions
3
...el-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-let-declars/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,3 @@ | ||
for (let i = 0; i < 0; i++) { | ||
let j = jj(); | ||
} |
3 changes: 3 additions & 0 deletions
3
...-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-let-declars/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,3 @@ | ||
for (let i = 0, j; i < 0; i++) { | ||
j = jj(); | ||
} |
4 changes: 4 additions & 0 deletions
4
...el-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/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 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var j = jj(); | ||
} | ||
for (var i = 0; ; ) var j = 0; |
4 changes: 4 additions & 0 deletions
4
...-plugin-transform-merge-sibling-variables/__tests__/fixtures/lift-var-declars/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 @@ | ||
for (var i = 0, j; i < 0; i++) { | ||
j = jj(); | ||
} | ||
for (var i = 0, j; ; ) j = 0; |
2 changes: 2 additions & 0 deletions
2
...in-transform-merge-sibling-variables/__tests__/fixtures/not-concat-block-scoped/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 @@ | ||
let i = 0; | ||
for (let x = 0; x < 10; x++) console.log(i + x); |
2 changes: 2 additions & 0 deletions
2
...-transform-merge-sibling-variables/__tests__/fixtures/not-concat-block-scoped/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 @@ | ||
let i = 0; | ||
for (let x = 0; x < 10; x++) console.log(i + x); |
2 changes: 2 additions & 0 deletions
2
...-transform-merge-sibling-variables/__tests__/fixtures/not-concat-const-for-loop/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 @@ | ||
const j = 0; | ||
for (const x = 0; ; ) console.log(j + x); |
2 changes: 2 additions & 0 deletions
2
...ransform-merge-sibling-variables/__tests__/fixtures/not-concat-const-for-loop/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 @@ | ||
const j = 0; | ||
for (const x = 0; ; ) console.log(j + x); |
6 changes: 6 additions & 0 deletions
6
...in-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-destructing/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,6 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var [j] = jj(); | ||
} | ||
for (var i = 0; i < 0; i++) { | ||
var { j } = jj(); | ||
} |
6 changes: 6 additions & 0 deletions
6
...-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-destructing/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,6 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var [j] = jj(); | ||
} | ||
for (var i = 0; i < 0; i++) { | ||
var { j } = jj(); | ||
} |
3 changes: 3 additions & 0 deletions
3
...ugin-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-diff-type/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,3 @@ | ||
for (let i = 0; i < 0; i++) { | ||
var i = 0; | ||
} |
3 changes: 3 additions & 0 deletions
3
...in-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-diff-type/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,3 @@ | ||
for (let i = 0; i < 0; i++) { | ||
var i = 0; | ||
} |
4 changes: 4 additions & 0 deletions
4
...n-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-mult-declars/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 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var i = 0, | ||
k = 0; | ||
} |
4 changes: 4 additions & 0 deletions
4
...transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-mult-declars/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 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var i = 0, | ||
k = 0; | ||
} |
6 changes: 6 additions & 0 deletions
6
...plugin-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-no-loop/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,6 @@ | ||
for (var i = 0; i < 0; i++) { | ||
var [j] = jj(); | ||
} | ||
for (var i = 0; i < 0; i++) { | ||
var { j } = jj(); | ||
} |
2 changes: 2 additions & 0 deletions
2
...ugin-transform-merge-sibling-variables/__tests__/fixtures/not-lift-on-no-loop/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 @@ | ||
for (;;) {} | ||
for (;;) var i = 0; |
3 changes: 3 additions & 0 deletions
3
...ransform-merge-sibling-variables/__tests__/fixtures/not-lift-on-not-initialized/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,3 @@ | ||
for (let i = 0; i < 0; i++) { | ||
var i = 0; | ||
} |
3 changes: 3 additions & 0 deletions
3
...nsform-merge-sibling-variables/__tests__/fixtures/not-lift-on-not-initialized/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,3 @@ | ||
for (var i = 0; ; ) { | ||
var i; | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/babel-plugin-transform-merge-sibling-variables/__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); |
145 changes: 0 additions & 145 deletions
145
...gin-transform-merge-sibling-variables/__tests__/transform-merge-sibling-variables-test.js
This file was deleted.
Oops, something went wrong.