File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,14 @@ new RuleTester({
100
100
} ,
101
101
] ,
102
102
} ,
103
+ // files field of `package.json` with convertPath
104
+ {
105
+ filename : fixture ( "simple-files/test/a.ts" ) ,
106
+ code : "const foo = await import('foo')" ,
107
+ options : [
108
+ { convertPath : { "src/**/*" : [ "src/(.+).ts" , "lib/$1.js" ] } } ,
109
+ ] ,
110
+ } ,
103
111
// Unknown files
104
112
{
105
113
code : "const foo = await import('foo')" ,
@@ -206,5 +214,21 @@ new RuleTester({
206
214
} ,
207
215
] ,
208
216
} ,
217
+ // files field of `package.json` with convertPath
218
+ {
219
+ filename : fixture ( "simple-files/src/a.ts" ) ,
220
+ code : "const foo = await import('foo')" ,
221
+ options : [
222
+ { convertPath : { "src/**/*" : [ "src/(.+).ts" , "lib/$1.js" ] } } ,
223
+ ] ,
224
+ errors : [
225
+ {
226
+ message :
227
+ "Top-level `await` is forbidden in published modules." ,
228
+ line : 1 ,
229
+ column : 13 ,
230
+ } ,
231
+ ] ,
232
+ } ,
209
233
] ,
210
234
} )
You can’t perform that action at this time.
0 commit comments