Skip to content

Commit 09e53e7

Browse files
committed
test: minor updates for testing on Windows
1 parent e961604 commit 09e53e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/plugin.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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';
33
import { PassThrough } from 'node:stream';
44
import { fileURLToPath } from 'node:url';
55
import { promisify } from 'node:util';
@@ -103,15 +103,15 @@ describe('Methods', () => {
103103
output: '/manifest.json',
104104
});
105105

106-
expect(manifest.getOutputPath()).toEqual('/manifest.json');
106+
expect(manifest.getOutputPath()).toEqual(`${sep}manifest.json`);
107107
});
108108

109109
it('Should work with a relative output path', () => {
110110
const { compiler, manifest } = create(configs.hello(), {
111111
output: '../manifest.json',
112112
});
113113

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`));
115115
});
116116

117117
it('Should output manifest in compiler output.path by default', () => {
@@ -1213,7 +1213,7 @@ describe('Options', () => {
12131213
expect(manifest.toString()).toEqual(content);
12141214
});
12151215

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 () => {
12171217
const { run } = create(configs.hello(), undefined, webpack);
12181218

12191219
await chmod(getWorkspace(), 0o444);

0 commit comments

Comments
 (0)