-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix detection of existing syntax plugins
AVA needs to add syntax plugins for stage-4 features, however it shouldn't do so if the user has already specified them. This fixes the detection of existing plugins by also comparing a `default` export of the plugin package. Fixes #1828.
- Loading branch information
1 parent
8f54022
commit d3bfb73
Showing
8 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
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
10 changes: 10 additions & 0 deletions
10
test/fixture/babel/with-explicit-syntax-plugins/async-generators/package.json
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,10 @@ | ||
{ | ||
"ava": { | ||
"cache": false | ||
}, | ||
"babel": { | ||
"plugins": [ | ||
"@babel/plugin-syntax-async-generators" | ||
] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
test/fixture/babel/with-explicit-syntax-plugins/async-generators/test.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 @@ | ||
import test from '../../../../..'; | ||
|
||
test('pass', t => t.pass()); |
10 changes: 10 additions & 0 deletions
10
test/fixture/babel/with-explicit-syntax-plugins/object-rest-spread/package.json
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,10 @@ | ||
{ | ||
"ava": { | ||
"cache": false | ||
}, | ||
"babel": { | ||
"plugins": [ | ||
"@babel/plugin-syntax-object-rest-spread" | ||
] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
test/fixture/babel/with-explicit-syntax-plugins/object-rest-spread/test.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 @@ | ||
import test from '../../../../..'; | ||
|
||
test('pass', t => t.pass()); |
10 changes: 10 additions & 0 deletions
10
test/fixture/babel/with-explicit-syntax-plugins/optional-catch-binding/package.json
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,10 @@ | ||
{ | ||
"ava": { | ||
"cache": false | ||
}, | ||
"babel": { | ||
"plugins": [ | ||
"@babel/plugin-syntax-optional-catch-binding" | ||
] | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
test/fixture/babel/with-explicit-syntax-plugins/optional-catch-binding/test.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 @@ | ||
import test from '../../../../..'; | ||
|
||
test('pass', t => t.pass()); |
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