question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate tests to typescript with `ts-jest`

See original GitHub issue

Test cases are written in javascript and it depends on dist, which causes 3 issues:

  1. coverage data is not clear for each module, only shows sval.js
  2. need to run start, before running test, and it’s easy to forget to run start script.
  3. no intellisense support when writing test cases.

I will give a PR later.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bloody-uxcommented, Apr 24, 2019

try it. but I still would like to use ts-jest, and I will find some way to fix issue 2. umi-test is based on jest and enzyme, so I think the problem will be still there.

umi-test can resolve the issue, I just tested and have a new PR. because it uses babel-jest instead of ts-jest

1reaction
bloody-uxcommented, Apr 24, 2019

issue 1 can be resolved with this pr

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration from <=23.10 | ts-jest - GitHub Pages
You can use the config:migrate tool of ts-jest CLI if you're coming from an older version to help you migrate your Jest configuration....
Read more >
Migrating a react code base test from using `ts-jest` to babel-jest
Beauty of ts-jest is that it test the types written in typescript unlike the babel-jest that does transformation to commmonjs.
Read more >
ts-jest/migrate.ts at main - config - GitHub
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript. - ts-jest/migrate.ts at main ·...
Read more >
Migrating to Jest
js or Tape you can automatically migrate with Jest Codemods (see below). If you like chai, you can upgrade to Jest and continue...
Read more >
Setting up a project with jest in TypeScript. - ITNEXT
ts -jest is a TypeScript preprocessor for jest , that lets you use jest to test projects written in TypeScript.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found