简体   繁体   中英

Using Chai with Jest + Typescript

So, I'm trying to use chai expect library while running Jest with Typescript but I'm not being able to.

What I'm actually trying to do is something similar to this: https://medium.com/@RubenOostinga/combining-chai-and-jest-matchers-d12d1ffd0303

But I'm having no luck achieving this with Typescript . I'm quite new to the JS / TS, coming from C , Go and Swift , so I might be missing something here.

Can someone give me any directions to this this with TS while having autocomplete and no type errors working?? Thanks in advance!!

PS: I'm using ts-jest

I finally gave up and just "import { expect } from chai;" in my spec files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM