File tree Expand file tree Collapse file tree 5 files changed +14
-10
lines changed
transpile-only-swc-shorthand-via-tsconfig
transpile-only-swc-via-tsconfig Expand file tree Collapse file tree 5 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -318,12 +318,16 @@ test.suite('ts-node', (test) => {
318
318
{
319
319
env : {
320
320
...process . env ,
321
- NODE_OPTIONS : `${ process . env . NODE_OPTIONS || '' } --require ${ require . resolve ( '../../tests/spy-swc-transpiler' ) } `
322
- }
321
+ NODE_OPTIONS : `${
322
+ process . env . NODE_OPTIONS || ''
323
+ } --require ${ require . resolve ( '../../tests/spy-swc-transpiler' ) } `,
324
+ } ,
323
325
}
324
326
) ;
325
327
expect ( err ) . toBe ( null ) ;
326
- expect ( stdout ) . toMatch ( 'Hello World! swc transpiler invocation count: 1\n' ) ;
328
+ expect ( stdout ) . toMatch (
329
+ 'Hello World! swc transpiler invocation count: 1\n'
330
+ ) ;
327
331
} ) ;
328
332
}
329
333
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ const swcTranspiler = require('ts-node/transpilers/swc');
5
5
global . swcTranspilerCalls = 0 ;
6
6
7
7
const wrappedCreate = swcTranspiler . create ;
8
- swcTranspiler . create = function ( ...args ) {
8
+ swcTranspiler . create = function ( ...args ) {
9
9
const transpiler = wrappedCreate ( ...args ) ;
10
10
const wrappedTranspile = transpiler . transpile ;
11
- transpiler . transpile = function ( ...args ) {
11
+ transpiler . transpile = function ( ...args ) {
12
12
global . swcTranspilerCalls ++ ;
13
13
return wrappedTranspile . call ( this , ...args ) ;
14
- }
14
+ } ;
15
15
return transpiler ;
16
- }
16
+ } ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class World {}
5
5
6
6
// intentional type errors to check transpile-only ESM loader skips type checking
7
7
parseInt ( 1101 , 2 ) ;
8
- const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
8
+ const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
9
9
console . log ( x ) ;
10
10
11
11
// test module type emit
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class World {}
5
5
6
6
// intentional type errors to check transpile-only ESM loader skips type checking
7
7
parseInt ( 1101 , 2 ) ;
8
- const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
8
+ const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
9
9
console . log ( x ) ;
10
10
11
11
// test module type emit
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class World {}
5
5
6
6
// intentional type errors to check transpile-only ESM loader skips type checking
7
7
parseInt ( 1101 , 2 ) ;
8
- const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
8
+ const x : number = `Hello ${ World . name } ! swc transpiler invocation count: ${ global . swcTranspilerCalls } ` ;
9
9
console . log ( x ) ;
10
10
11
11
// test module type emit
You can’t perform that action at this time.
0 commit comments