-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
/
create-fork-ts-checker-plugin.test.ts
43 lines (34 loc) · 1.51 KB
/
create-fork-ts-checker-plugin.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
// import getTsLoaderOptions from '../ts_config';
// import createForkTsCheckerInstance from '../create-fork-ts-checker-plugin';
// // eslint-disable-next-line global-require, jest/no-mocks-import
// jest.mock('fs', () => require('../../../../../__mocks__/fs'));
// jest.mock('path', () => ({
// resolve: () => 'tsconfig.json',
// }));
// jest.mock('@storybook/node-logger');
// const setupFiles = (files: any) => {
// // eslint-disable-next-line no-underscore-dangle, global-require
// require('fs').__setMockFiles(files);
// };
// describe('create-fork-ts-checker-plugin.test', () => {
// it('should create a ForkTsCheckerWebpackPlugin instance', () => {
// setupFiles({ 'tsconfig.json': '{}' });
// const tsLoaderOptions = getTsLoaderOptions('.foo');
// // todo resolve any
// const instance: any = createForkTsCheckerInstance(tsLoaderOptions);
// expect(instance).toBeInstanceOf(ForkTsCheckerWebpackPlugin);
// expect(instance.tsconfig).toEqual(tsLoaderOptions.configFile);
// });
// it('should create a ForkTsCheckerWebpackPlugin instance without passing options', () => {
// // add proper typing
// const instance = createForkTsCheckerInstance({} as any);
// expect(instance).toBeInstanceOf(ForkTsCheckerWebpackPlugin);
// });
// });
it('work-around', () => {
expect(true).toBe(true);
});
// Make it work with --isolatedModules, we need a dummy export
/* eslint-disable jest/no-export */
export default {};