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'
12import { describe , expect , test } from 'vitest'
23import type { ResolvedConfig , UserConfig } from '../../config'
34import {
45 resolveEsbuildTranspileOptions ,
56 transformWithEsbuild ,
67} from '../../plugins/esbuild'
8+ import { normalizePath } from '../../utils'
79
810describe ( 'resolveEsbuildTranspileOptions' , ( ) => {
911 test ( 'resolve default' , ( ) => {
@@ -326,7 +328,7 @@ describe('transformWithEsbuild', () => {
326328 bar = 'bar'
327329 }
328330 ` ,
329- 'bar.ts' ,
331+ normalizePath ( path . resolve ( import . meta . dirname , 'bar.ts' ) ) ,
330332 {
331333 target,
332334 tsconfigRaw : { compilerOptions : tsconfigCompilerOptions } ,
@@ -387,7 +389,9 @@ describe('transformWithEsbuild', () => {
387389 } )
388390
389391 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+ } )
391395 expect ( actual ) . toBe ( defineForClassFieldsFalseTransformedCode )
392396 } )
393397 } )
You can’t perform that action at this time.
0 commit comments