mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: support workspace configs
This commit is contained in:
@@ -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 }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user