Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ dist/
types/
/test/restDocs/*.json
/test/restDocs/results/
/test/restDocs/snapshots/
3 changes: 0 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ module.exports = {
sourceType: 'module',
project: './tsconfig.json',
},
env: {
mocha: true,
},
root: true,
};
6 changes: 0 additions & 6 deletions .mocharc.json

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
/test/*cache.json
/test/restDocs/*.json
/test/restDocs/results/
/test/restDocs/snapshots/
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ GAPI_MAX_PARALLEL=3 npm run lint

#### Unit (WIP)

Unit tests for this generator project are written with [Jasmine](https://jasmine.github.io/) and
[Mocha](https://mochajs.org/). They can be run via:
Unit tests for this generator project are written with [Jest](https://jestjs.io/). They can be run via:

```sh
npm run test
Expand Down
2 changes: 1 addition & 1 deletion bin/cspell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ const files = (await sh.runSh('npx -y ls-ignore --paths')).stdout
.filter(x => x.trim() !== '')
.filter(x => !(x.startsWith('test/restDocs') && x.endsWith('.json')))
.filter(x => !x.startsWith('test/restDocs/results/'))
.filter(x => !x.startsWith('test/restDocs/snapshots/'));
.filter(x => !x.startsWith('test/restDocs/__snapshots__/'));
await sh.runSh(`npx -y cspell ${files.join(' ')}`);
12 changes: 12 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {JestConfigWithTsJest} from 'ts-jest';
import {defaultsESM} from 'ts-jest/presets';

const config: JestConfigWithTsJest = {
...defaultsESM,
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testRegex: '/test/.*(?<!\\.integration)\\.spec\\.ts$',
};

export default config;
9 changes: 9 additions & 0 deletions jest.integration.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {JestConfigWithTsJest} from 'ts-jest';
import defaultConfig from './jest.config';

const config: JestConfigWithTsJest = {
...defaultConfig,
testRegex: '/test/.*\\.integration\\.spec\\.ts$',
};

export default config;
Loading