@@ -4,6 +4,7 @@ import { describe, it } from "node:test";
4
4
5
5
import {
6
6
resolveSolidityUserConfig ,
7
+ shouldUseWasm ,
7
8
validateSolidityUserConfig ,
8
9
} from "../../../../src/internal/builtin-plugins/solidity/config.js" ;
9
10
@@ -465,7 +466,7 @@ describe("solidity plugin config resolution", () => {
465
466
describe ( "preferWasm setting resolution" , function ( ) {
466
467
const otherResolvedConfig = { paths : { root : process . cwd ( ) } } as any ;
467
468
468
- it ( "resolves to true when build profile is production and is not specified in the config" , async ( ) => {
469
+ it ( "resolves to shouldUseWasm() when build profile is production and is not specified in the config" , async ( ) => {
469
470
const resolvedConfig = await resolveSolidityUserConfig (
470
471
{
471
472
solidity : {
@@ -482,11 +483,11 @@ describe("solidity plugin config resolution", () => {
482
483
483
484
assert . equal (
484
485
resolvedConfig . solidity . profiles . production . preferWasm ,
485
- true ,
486
+ shouldUseWasm ( ) ,
486
487
) ;
487
488
} ) ;
488
489
489
- it ( "resolves to true when build profile is production and is specified, but preferWasm is not set" , async ( ) => {
490
+ it ( "resolves to shouldUseWasm() when build profile is production and is specified, but preferWasm is not set" , async ( ) => {
490
491
const resolvedConfig = await resolveSolidityUserConfig (
491
492
{
492
493
solidity : {
@@ -506,7 +507,7 @@ describe("solidity plugin config resolution", () => {
506
507
507
508
assert . equal (
508
509
resolvedConfig . solidity . profiles . production . preferWasm ,
509
- true ,
510
+ shouldUseWasm ( ) ,
510
511
) ;
511
512
} ) ;
512
513
@@ -550,9 +551,6 @@ describe("solidity plugin config resolution", () => {
550
551
profile_2 : {
551
552
version : "0.8.28" ,
552
553
} ,
553
- production : {
554
- version : "0.8.28" ,
555
- } ,
556
554
} ,
557
555
} ,
558
556
} ,
@@ -568,10 +566,6 @@ describe("solidity plugin config resolution", () => {
568
566
resolvedConfig . solidity . profiles . profile_2 . preferWasm ,
569
567
false ,
570
568
) ;
571
- assert . equal (
572
- resolvedConfig . solidity . profiles . production . preferWasm ,
573
- true ,
574
- ) ;
575
569
} ) ;
576
570
} ) ;
577
571
} ) ;
0 commit comments