@@ -10,6 +10,7 @@ import {
1010} from "../../src/extractor/index.ts" ;
1111
1212// CONSTANTS
13+ const __dirname = import . meta. dirname ;
1314const kFixturesDir = path . join ( __dirname , ".." , "fixtures" ) ;
1415const kExtractorFixture = path . join ( kFixturesDir , "extractor" ) ;
1516
@@ -34,14 +35,24 @@ test("NodeDependencyExtractor: extract() does not include the root package", asy
3435 const extractor = new NodeDependencyExtractor ( ) ;
3536 const packages = await extractor . extract ( kExtractorFixture ) ;
3637
37- const rootEntry = packages . find ( ( pkg ) => pkg . name === "test-extractor-project" ) ;
38- assert . strictEqual ( rootEntry , undefined , "the root package must not appear in results" ) ;
38+ const rootEntry = packages . find (
39+ ( pkg ) => pkg . name === "test-extractor-project"
40+ ) ;
41+ assert . strictEqual (
42+ rootEntry ,
43+ undefined ,
44+ "the root package must not appear in results"
45+ ) ;
3946} ) ;
4047
4148test ( "NodeDependencyExtractor: extract() returns no duplicate name@version pairs" , async ( ) => {
4249 const extractor = new NodeDependencyExtractor ( ) ;
4350 const packages = await extractor . extract ( kExtractorFixture ) ;
4451
4552 const specs = new Set ( packages . map ( ( pkg ) => `${ pkg . name } @${ pkg . version } ` ) ) ;
46- assert . strictEqual ( specs . size , packages . length , "must not contain duplicate name@version entries" ) ;
53+ assert . strictEqual (
54+ specs . size ,
55+ packages . length ,
56+ "must not contain duplicate name@version entries"
57+ ) ;
4758} ) ;
0 commit comments