@@ -46,10 +46,10 @@ describe("Utilities", () => {
46
46
it ( "should throw if the constructor arguments exported in constructorArgsModule are not an array" , async ( ) => {
47
47
const constructorArgsModule =
48
48
"test/unit/mocks/invalid-constructor-args.js" ;
49
- const constructorArgsModulePath = path . resolve (
50
- process . cwd ( ) ,
51
- constructorArgsModule
52
- ) ;
49
+ const constructorArgsModulePath = path
50
+ . resolve ( process . cwd ( ) , constructorArgsModule )
51
+ // make test work on windows
52
+ . replace ( / \\ / g , "\\\\" ) ;
53
53
await expect (
54
54
resolveConstructorArguments ( [ ] , constructorArgsModule )
55
55
) . to . be . rejectedWith (
@@ -100,7 +100,11 @@ describe("Utilities", () => {
100
100
101
101
it ( "should throw if the libraries exported in librariesModule are not a dictionary" , async ( ) => {
102
102
const librariesModule = "test/unit/mocks/invalid-libraries.js" ;
103
- const librariesModulePath = path . resolve ( process . cwd ( ) , librariesModule ) ;
103
+ const librariesModulePath = path
104
+ . resolve ( process . cwd ( ) , librariesModule )
105
+ // make test work on windows
106
+ . replace ( / \\ / g, "\\\\" ) ;
107
+
104
108
await expect ( resolveLibraries ( librariesModule ) ) . to . be . rejectedWith (
105
109
new RegExp (
106
110
`The module ${ librariesModulePath } doesn't export a dictionary.`
0 commit comments