File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/vite/src/node/__tests__/plugins Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ import path from 'node:path'
1
2
import { describe , expect , test } from 'vitest'
2
3
import type { ResolvedConfig , UserConfig } from '../../config'
3
4
import {
4
5
resolveEsbuildTranspileOptions ,
5
6
transformWithEsbuild ,
6
7
} from '../../plugins/esbuild'
8
+ import { normalizePath } from '../../utils'
7
9
8
10
describe ( 'resolveEsbuildTranspileOptions' , ( ) => {
9
11
test ( 'resolve default' , ( ) => {
@@ -326,7 +328,7 @@ describe('transformWithEsbuild', () => {
326
328
bar = 'bar'
327
329
}
328
330
` ,
329
- 'bar.ts' ,
331
+ normalizePath ( path . resolve ( import . meta . dirname , 'bar.ts' ) ) ,
330
332
{
331
333
target,
332
334
tsconfigRaw : { compilerOptions : tsconfigCompilerOptions } ,
@@ -387,7 +389,9 @@ describe('transformWithEsbuild', () => {
387
389
} )
388
390
389
391
test ( 'target: es2022 and tsconfig.target: undefined => false' , async ( ) => {
390
- const actual = await transformClassCode ( 'es2022' , { } )
392
+ const actual = await transformClassCode ( 'es2022' , {
393
+ target : undefined ,
394
+ } )
391
395
expect ( actual ) . toBe ( defineForClassFieldsFalseTransformedCode )
392
396
} )
393
397
} )
You can’t perform that action at this time.
0 commit comments