Merge pull request #3500 from Fox32/fix-windows-builds-2

Make backend-commons tests work on Windows
This commit is contained in:
Oliver Sand
2020-11-30 18:49:30 +01:00
committed by GitHub
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');