Make backend-commons tests work on Windows

This commit is contained in:
Oliver Sand
2020-11-30 18:06:42 +01:00
parent 7aa0830abb
commit 52f6438794
2 changed files with 2 additions and 2 deletions
@@ -126,7 +126,7 @@ describe('TarArchiveResponse', () => {
const res = new TarArchiveResponse(stream, 'mock-repo/docs/', '/tmp');
const dir = await res.dir();
expect(dir).toMatch(/^\/tmp\/.*$/);
expect(dir).toMatch(/^[\/\\]tmp[\/\\].*$/);
await expect(
fs.readFile(resolvePath(dir, 'index.md'), 'utf8'),
).resolves.toBe('# Test\n');
@@ -126,7 +126,7 @@ describe('ZipArchiveResponse', () => {
const res = new ZipArchiveResponse(stream, 'mock-repo/docs/', '/tmp');
const dir = await res.dir();
expect(dir).toMatch(/^\/tmp\/.*$/);
expect(dir).toMatch(/^[\/\\]tmp[\/\\].*$/);
await expect(
fs.readFile(resolvePath(dir, 'index.md'), 'utf8'),
).resolves.toBe('# Test\n');