Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisit mocha setup #451

Closed
7 tasks done
0x6b opened this issue Jan 7, 2018 · 4 comments · Fixed by #496 or #511
Closed
7 tasks done

Revisit mocha setup #451

0x6b opened this issue Jan 7, 2018 · 4 comments · Fixed by #496 or #511
Assignees
Labels
Type: Testing Adding missing tests or correcting existing tests

Comments

@0x6b
Copy link
Member

0x6b commented Jan 7, 2018

We found that, in some situation, mocha runs fine while tsc cannot compile TypeScript test cases (issue #448 and pull request #449). We have to review current setup for each packages and make changes needed in order to improve credibility/stability of tests.

As @azu said at #449 (comment), Jest is one of options.

Edit: add list of ts-setup.js for review.
Edit 2: update list as some packages are moved to @textlint by #455

@0x6b 0x6b added the Type: Testing Adding missing tests or correcting existing tests label Jan 7, 2018
@azu
Copy link
Member

azu commented Jan 16, 2018

@azu
Copy link
Member

azu commented Jan 21, 2018

ts-jest has same problem 😢
Type error reporting · Issue #79 · kulshekhar/ts-jest

@azu
Copy link
Member

azu commented Jan 21, 2018

I've created a loader package that use with ts-node.

We can replace ts-setup.js with ts-node-test-register.

@0x6b
Copy link
Member Author

0x6b commented Jan 28, 2018

@azu, thanks for the new module. I'll try.

@0x6b 0x6b self-assigned this Jan 28, 2018
0x6b added a commit to 0x6b/textlint that referenced this issue Jan 28, 2018
In order to improve credibility and stability of tests, use
`ts-node-test-register` to:

- Load `tsconfig.json` from `test` directory
- Enforce `typeCheck` always

replacing `ts-setup.js` with `ts-node-test-register` in following
packages:

- `textlint-tester`
- `ast-node-types`
- `ast-traverse`
- `fixer-formatter`
- `kernel`
- `linter-formatter`
- `textlint`

https://www.npmjs.com/package/ts-node-test-register

Closes textlint#451.
@0x6b 0x6b closed this as completed in #496 Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Testing Adding missing tests or correcting existing tests
Projects
None yet
2 participants