1- import { dirname } from 'node:path' ;
1+ import { join , dirname } from 'node:path' ;
22import { fileURLToPath } from 'node:url' ;
33import fs from 'node:fs' ;
44import test from 'supertape' ;
55import { getColumns , isDev } from './columns.mjs' ;
66
77const __filename = fileURLToPath ( import . meta. url ) ;
88const __dirname = dirname ( __filename ) ;
9+ const distDir = join ( __dirname , '..' , 'dist-dev' ) ;
910
1011test ( 'columns: prod' , ( t ) => {
1112 const columns = getColumns ( {
@@ -21,7 +22,7 @@ test('columns: dev', (t) => {
2122 isDev : true ,
2223 } ) ;
2324
24- const css = fs . readFileSync ( `${ __dirname } /../css /columns/name-size-date.css` , 'utf8' ) ;
25+ const css = fs . readFileSync ( `${ distDir } /columns/name-size-date.css` , 'utf8' ) ;
2526
2627 t . match ( columns [ 'name-size-date' ] , css ) ;
2728 t . end ( ) ;
@@ -32,7 +33,7 @@ test('columns: no args', (t) => {
3233 isDev ( true ) ;
3334 const columns = getColumns ( ) ;
3435
35- const css = fs . readFileSync ( `${ __dirname } /../css /columns/name-size-date.css` , 'utf8' ) ;
36+ const css = fs . readFileSync ( `${ distDir } /columns/name-size-date.css` , 'utf8' ) ;
3637 isDev ( currentIsDev ) ;
3738
3839 t . match ( columns [ 'name-size-date' ] , css ) ;
0 commit comments