feat: support workspace configs

This commit is contained in:
Igor Randjelovic
2021-03-11 16:19:05 +01:00
parent 567a7ed25c
commit 437c3b41f9
12 changed files with 410 additions and 62 deletions

View File

@@ -1,4 +1,3 @@
import './jest.mockFiles';
// we are mocking the cwd for the tests, since webpack needs absolute paths
// and we don't want them in tests
process.cwd = () => '__jest__';
@@ -65,3 +64,15 @@ jest.mock('path', () => {
},
};
});
// a virtual mock for package.json
jest.mock(
'__jest__/package.json',
() => ({
main: 'src/app.js',
devDependencies: {
typescript: '*',
},
}),
{ virtual: true }
);