Skip to content

Commit 3cdb73a

Browse files
committed
Fix a test on Windows.
1 parent bb71938 commit 3cdb73a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/rush-sdk/src/test/script.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ describe('used in script', () => {
1515
[
1616
'-e',
1717
`
18-
const { Import } = require("${coreLibPath}");
18+
const { Import } = require(${JSON.stringify(coreLibPath)});
1919
const originalResolveModule = Import.resolveModule;
2020
const mockResolveModule = (options) => {
2121
if (options.baseFolderPath.includes('install-run') && options.modulePath === '@microsoft/rush-lib') {
22-
return "${mockRushLibPath}";
22+
return ${JSON.stringify(mockRushLibPath)};
2323
}
2424
return originalResolveModule(options);
2525
}
2626
Import.resolveModule = mockResolveModule;
27-
console.log(require("${rushSdkPath}"));
27+
console.log(require(${JSON.stringify(rushSdkPath)}));
2828
`
2929
],
3030
{

0 commit comments

Comments
 (0)