@@ -2,31 +2,25 @@ import { describe, expect, test } from 'vitest';
22import { setupTestEnvironment } from '../test-helpers.js' ;
33
44describe ( 'Package Exports Resolution' , ( ) => {
5- test . fails (
6- 'should resolve ESM imports with react-native condition' ,
7- async ( ) => {
8- const { resolve } = await setupTestEnvironment ( [ 'exports' ] , {
9- platform : 'ios' ,
10- enablePackageExports : true ,
11- } ) ;
5+ test ( 'should resolve ESM imports with react-native condition' , async ( ) => {
6+ const { resolve } = await setupTestEnvironment ( [ 'exports' ] , {
7+ platform : 'ios' ,
8+ enablePackageExports : true ,
9+ } ) ;
1210
13- const result = await resolve ( 'complex-lib' , 'esm' ) ;
14- expect ( result ) . toBe ( '/node_modules/complex-lib/esm/index.native.js' ) ;
15- }
16- ) ;
11+ const result = await resolve ( 'complex-lib' , 'esm' ) ;
12+ expect ( result ) . toBe ( '/node_modules/complex-lib/esm/index.native.js' ) ;
13+ } ) ;
1714
18- test . fails (
19- 'should resolve CommonJS requires with react-native condition' ,
20- async ( ) => {
21- const { resolve } = await setupTestEnvironment ( [ 'exports' ] , {
22- platform : 'ios' ,
23- enablePackageExports : true ,
24- } ) ;
15+ test ( 'should resolve CommonJS requires with react-native condition' , async ( ) => {
16+ const { resolve } = await setupTestEnvironment ( [ 'exports' ] , {
17+ platform : 'ios' ,
18+ enablePackageExports : true ,
19+ } ) ;
2520
26- const result = await resolve ( 'complex-lib' , 'cjs' ) ;
27- expect ( result ) . toBe ( '/node_modules/complex-lib/cjs/index.native.js' ) ;
28- }
29- ) ;
21+ const result = await resolve ( 'complex-lib' , 'cjs' ) ;
22+ expect ( result ) . toBe ( '/node_modules/complex-lib/cjs/index.native.js' ) ;
23+ } ) ;
3024
3125 test ( 'should resolve utils subpath' , async ( ) => {
3226 const { resolve } = await setupTestEnvironment ( [ 'exports' ] , {
@@ -51,25 +45,22 @@ describe('Package Exports Resolution', () => {
5145 expect ( result ) . toBe ( '/node_modules/complex-lib/native-specific.js' ) ;
5246 } ) ;
5347
54- test . fails (
55- 'should resolve to native version for react-native condition' ,
56- async ( ) => {
57- const { resolve } = await setupTestEnvironment ( [ 'react-strict-dom' ] , {
58- platform : 'ios' ,
59- enablePackageExports : true ,
60- } ) ;
48+ test ( 'should resolve to native version for react-native condition' , async ( ) => {
49+ const { resolve } = await setupTestEnvironment ( [ 'react-strict-dom' ] , {
50+ platform : 'ios' ,
51+ enablePackageExports : true ,
52+ } ) ;
6153
62- const esmResult = await resolve ( 'react-strict-dom' , 'esm' ) ;
63- expect ( esmResult ) . toBe (
64- '/node_modules/react-strict-dom/dist/native/index.js'
65- ) ;
54+ const esmResult = await resolve ( 'react-strict-dom' , 'esm' ) ;
55+ expect ( esmResult ) . toBe (
56+ '/node_modules/react-strict-dom/dist/native/index.js'
57+ ) ;
6658
67- const cjsResult = await resolve ( 'react-strict-dom' , 'cjs' ) ;
68- expect ( cjsResult ) . toBe (
69- '/node_modules/react-strict-dom/dist/native/index.js'
70- ) ;
71- }
72- ) ;
59+ const cjsResult = await resolve ( 'react-strict-dom' , 'cjs' ) ;
60+ expect ( cjsResult ) . toBe (
61+ '/node_modules/react-strict-dom/dist/native/index.js'
62+ ) ;
63+ } ) ;
7364
7465 test ( 'should fail to resolve with package exports disabled' , async ( ) => {
7566 const { resolve } = await setupTestEnvironment ( [ 'react-strict-dom' ] , {
0 commit comments