Jest not finding typescript tests

Multi tool use
Jest not finding typescript tests
I'm trying to write a jest test but it's giving me an odd error.
TypeError: jest_1.it is not a function
9 |
10 | describe('Health check', () => {
> 11 | it('GET works', async () => {
I'm not sure if posting all the various config files would help so maybe I'll just point out the pieces I'm using: serverless framework with serverless-plugin-typescript plugin, typescript, jest, ts-jest.
My understanding is that ts-jest should be compiling the TS for me and then handing it over to Jest. One thing is I know serverless is opinionated about it's TS configuration so maybe that's causing an issue with ts-jest.
Any ideas about what I should be looking at?
Edit: formatting on code block
1 Answer
1
Figured it out. I had imported it
at the top of my test file like so:
it
import {it} from 'jest'
import {it} from 'jest'
Removing it fixed it. Time to go read about modules.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.