scaffolder-backend: fix or skip tests on windows

This commit is contained in:
Patrik Oldsberg
2020-09-01 23:39:22 +02:00
parent 30747fd724
commit 2723fb78d2
2 changed files with 10 additions and 1 deletions
@@ -96,6 +96,8 @@ describe('GitHubPreparer', () => {
mockEntity.spec.path = './template/test/1/2/3';
const response = await preparer.prepare(mockEntity);
expect(response).toMatch(new RegExp(/\/template\/test\/1\/2\/3$/));
expect(response.split('\\').join('/')).toMatch(
/\/template\/test\/1\/2\/3$/,
);
});
});
@@ -20,6 +20,13 @@ import Docker from 'dockerode';
import { runDockerContainer } from './helpers';
describe('helpers', () => {
if (process.platform === 'win32') {
// eslint-disable-next-line jest/no-focused-tests
it.only('should skip tests on windows', () => {
expect('test').not.toBe('run');
});
}
const mockDocker = new Docker() as jest.Mocked<Docker>;
beforeEach(() => {