@@ -13,6 +13,8 @@ const { test, it, describe } = require('node:test');
1313const { chmodSync, writeFileSync, constants } = require ( 'node:fs' ) ;
1414const { join } = require ( 'node:path' ) ;
1515
16+ const onlyWithAmaro = { skip : ! process . config . variables . node_use_amaro } ;
17+
1618test ( 'should handle non existing json' , async ( ) => {
1719 const result = await spawnPromisified ( process . execPath , [
1820 '--experimental-config-file' ,
@@ -49,7 +51,7 @@ test('should handle empty object json', async () => {
4951 assert . strictEqual ( result . code , 0 ) ;
5052} ) ;
5153
52- test ( 'should parse boolean flag' , { skip : ! process . config . variables . node_use_amaro } , async ( ) => {
54+ test ( 'should parse boolean flag' , onlyWithAmaro , async ( ) => {
5355 const result = await spawnPromisified ( process . execPath , [
5456 '--experimental-config-file' ,
5557 fixtures . path ( 'rc/transform-types.json' ) ,
@@ -84,7 +86,7 @@ test('should throw an error when a flag is declared twice', async () => {
8486} ) ;
8587
8688
87- test ( 'should override env-file' , { skip : ! process . config . variables . node_use_amaro } , async ( ) => {
89+ test ( 'should override env-file' , onlyWithAmaro , async ( ) => {
8890 const result = await spawnPromisified ( process . execPath , [
8991 '--no-warnings' ,
9092 '--experimental-config-file' ,
@@ -97,7 +99,7 @@ test('should override env-file', { skip: !process.config.variables.node_use_amar
9799 assert . strictEqual ( result . code , 0 ) ;
98100} ) ;
99101
100- test ( 'should not override NODE_OPTIONS' , { skip : ! process . config . variables . node_use_amaro } , async ( ) => {
102+ test ( 'should not override NODE_OPTIONS' , onlyWithAmaro , async ( ) => {
101103 const result = await spawnPromisified ( process . execPath , [
102104 '--no-warnings' ,
103105 '--experimental-config-file' ,
@@ -114,7 +116,7 @@ test('should not override NODE_OPTIONS', { skip: !process.config.variables.node_
114116 assert . strictEqual ( result . code , 1 ) ;
115117} ) ;
116118
117- test ( 'should not override CLI flags' , { skip : ! process . config . variables . node_use_amaro } , async ( ) => {
119+ test ( 'should not override CLI flags' , onlyWithAmaro , async ( ) => {
118120 const result = await spawnPromisified ( process . execPath , [
119121 '--no-warnings' ,
120122 '--no-experimental-transform-types' ,
0 commit comments