|
1 | 1 | import { chmod, copyFile, mkdir, stat } from 'node:fs/promises';
|
2 |
| -import { resolve, dirname, join } from 'node:path'; |
| 2 | +import { resolve, dirname, join, sep } from 'node:path'; |
3 | 3 | import { PassThrough } from 'node:stream';
|
4 | 4 | import { fileURLToPath } from 'node:url';
|
5 | 5 | import { promisify } from 'node:util';
|
@@ -103,15 +103,15 @@ describe('Methods', () => {
|
103 | 103 | output: '/manifest.json',
|
104 | 104 | });
|
105 | 105 |
|
106 |
| - expect(manifest.getOutputPath()).toEqual('/manifest.json'); |
| 106 | + expect(manifest.getOutputPath()).toEqual(`${sep}manifest.json`); |
107 | 107 | });
|
108 | 108 |
|
109 | 109 | it('Should work with a relative output path', () => {
|
110 | 110 | const { compiler, manifest } = create(configs.hello(), {
|
111 | 111 | output: '../manifest.json',
|
112 | 112 | });
|
113 | 113 |
|
114 |
| - expect(manifest.getOutputPath()).toEqual(resolve(String(compiler.options.output.path), '../manifest.json')); |
| 114 | + expect(manifest.getOutputPath()).toEqual(resolve(String(compiler.options.output.path), `..${sep}manifest.json`)); |
115 | 115 | });
|
116 | 116 |
|
117 | 117 | it('Should output manifest in compiler output.path by default', () => {
|
@@ -1213,7 +1213,7 @@ describe('Options', () => {
|
1213 | 1213 | expect(manifest.toString()).toEqual(content);
|
1214 | 1214 | });
|
1215 | 1215 |
|
1216 |
| - it('Compiler has error if unable to create directory', async () => { |
| 1216 | + it.skipIf(process.platform === 'win32')('Compiler has error if unable to create directory', async () => { |
1217 | 1217 | const { run } = create(configs.hello(), undefined, webpack);
|
1218 | 1218 |
|
1219 | 1219 | await chmod(getWorkspace(), 0o444);
|
|
0 commit comments