1- import { test } from "tap" ;
1+ import { test } from "node:test" ;
2+ import assert from "node:assert/strict" ;
23import EikConfig from "../../../lib/classes/eik-config.js" ;
34
45const validEikConfig = {
@@ -8,27 +9,29 @@ const validEikConfig = {
89 version : "0.0.0" ,
910} ;
1011
11- test ( "EikConfig: .cwd set to /some/path" , ( t ) => {
12+ test ( "EikConfig: .cwd set to /some/path" , ( ) => {
1213 const config = new EikConfig ( validEikConfig , [ ] , "/some/path" ) ;
13- t . equal ( config . cwd , "/some/path" , "should equal the given cwd" ) ;
14- t . end ( ) ;
14+ assert . strictEqual ( config . cwd , "/some/path" , "should equal the given cwd" ) ;
1515} ) ;
1616
17- test ( "EikConfig: .cwd set to /some/path/" , ( t ) => {
17+ test ( "EikConfig: .cwd set to /some/path/" , ( ) => {
1818 const config = new EikConfig ( validEikConfig , [ ] , "/some/path/" ) ;
19- t . equal ( config . cwd , "/some/path" , "should normalize the given cwd" ) ;
20- t . end ( ) ;
19+ assert . strictEqual (
20+ config . cwd ,
21+ "/some/path" ,
22+ "should normalize the given cwd" ,
23+ ) ;
2124} ) ;
2225
23- test ( "EikConfig: .cwd set to invalid relative path some/path" , ( t ) => {
26+ test ( "EikConfig: .cwd set to invalid relative path some/path" , ( ) => {
2427 try {
2528 new EikConfig ( validEikConfig , [ ] , "some/path" ) ;
2629 } catch ( err ) {
27- t . match (
28- err instanceof Error ? err . message : String ( err ) ,
29- '"configRootDir" must be an absolute path:' ,
30+ assert . ok (
31+ ( err instanceof Error ? err . message : String ( err ) ) . includes (
32+ '"configRootDir" must be an absolute path:' ,
33+ ) ,
3034 "should throw expected error with message" ,
3135 ) ;
3236 }
33- t . end ( ) ;
3437} ) ;
0 commit comments