codelab icon indicating copy to clipboard operation
codelab copied to clipboard

Move tests to jest

Open NothingEverHappens opened this issue 5 years ago • 7 comments

What the issue is about

Right now we're using karma for some tests and jest for the other ones. Jest is faster, so we should set up all our tests to use it

Where to start

We're using nx, check out their docs for moving to jest Search for test in package json to see how we run tests now

NothingEverHappens avatar Oct 08 '19 14:10 NothingEverHappens

Hi, Please can I work on this issue? Thanks.

hansal7014 avatar Oct 19 '19 16:10 hansal7014

@hansal7014 Go for it, let me know if you get stack at any point,

cc @matt-oconnell who was looking into fixing test, just FYI

kirjs avatar Oct 19 '19 17:10 kirjs

@kirjs There are about 50 test files using karma (i.e. with extension '.spec.ts'). Do all of them need to be converted to use Jest? If so, I would like to break up the work app-wise given the large number of tests.

hansal7014 avatar Oct 19 '19 18:10 hansal7014

Yes, all apps should use jest in the end. Breaking the work up per-app would make sense to me.

Also note that some tests are still broken, fixing them doesn't have to be part of this task

NothingEverHappens avatar Oct 19 '19 18:10 NothingEverHappens

hey @hansal7014 there was some work done with this in #1176, not sure what your status is on this, just trying to avoid further redundant work

kirjs avatar Oct 22 '19 16:10 kirjs

Hi @kirjs, Looks like I worked on some tests which are already done in #1176. @Mutmatt, can you tell me if there are any tests remaining which need to be refactored to use Jest.

hansal7014 avatar Oct 23 '19 01:10 hansal7014

Hi @kirjs, Looks like I worked on some tests which are already done in #1176. @Mutmatt, can you tell me if there are any tests remaining which need to be refactored to use Jest.

I primarily tried to get kirjs's tests running and functional. If you look at any other project the tests may be less functional. All of the tests should now be running under the jest framework, though.

O-Mutt avatar Oct 23 '19 18:10 O-Mutt