File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 env :
7373 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : true
7474 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD : true
75- - run : npm run test:unit
75+ - run : npm run test:unit:windows
7676
7777 runner-tests :
7878 name : Runner tests
Original file line number Diff line number Diff line change 6464 "prettier" : " prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.cjs" ,
6565 "docs" : " ./runok.cjs docs" ,
6666 "test:unit" : " mocha test/unit --recursive --timeout 10000 --reporter @testomatio/reporter/mocha" ,
67+ "test:unit:windows" : " mocha test/unit/container_test.js --recursive --timeout 10000 --reporter @testomatio/reporter/mocha" ,
6768 "test:rest" : " mocha test/rest --recursive --timeout 20000 --reporter @testomatio/reporter/mocha" ,
6869 "test:runner" : " mocha test/runner --recursive --timeout 10000 --reporter @testomatio/reporter/mocha" ,
6970 "test" : " npm run test:unit && npm run test:rest && npm run test:runner" ,
Original file line number Diff line number Diff line change 11import { expect } from 'chai'
22import path from 'path'
3- import { fileURLToPath } from 'url'
3+ import { fileURLToPath , pathToFileURL } from 'url'
44
55const __filename = fileURLToPath ( import . meta. url )
66const __dirname = path . dirname ( __filename )
@@ -9,6 +9,7 @@ import FileSystem from '../../lib/helper/FileSystem.js'
99import actor from '../../lib/actor.js'
1010import container from '../../lib/container.js'
1111import Translation from '../../lib/translation.js'
12+ import { isWindows } from '../../lib/utils.js'
1213
1314describe ( 'Container' , ( ) => {
1415 before ( ( ) => {
@@ -183,7 +184,7 @@ describe('Container', () => {
183184 dummyPage : './data/dummy_page.js' ,
184185 } ,
185186 } )
186- const dummyPage = await import ( '../data/dummy_page.js' )
187+ const dummyPage = isWindows ( ) ? await import ( pathToFileURL ( '../data/dummy_page.js' ) . href ) : await import ( '../data/dummy_page.js' )
187188 expect ( container . support ( 'dummyPage' ) . toString ( ) ) . is . eql ( ( dummyPage . default || dummyPage ) . toString ( ) )
188189 } )
189190
You can’t perform that action at this time.
0 commit comments