-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update to be compatible with latest @types/jest #15
Conversation
Note that this change is not backward-compatible, this will not work with older versions of @types/jest.
Codecov Report
@@ Coverage Diff @@
## master #15 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 15 15
Branches 2 2
=====================================
Hits 15 15 Continue to review full report at Codecov.
|
Co-Authored-By: Userbit <34487074+Userbit@users.noreply.github.com>
@Userbit cool, thanks! |
Hey @dobesv @Userbit thanks for the PR/review! I'm not sure this PR should be necessary as the types in I've just started a new project locally with I'm going to go ahead and close this for now, but please feel free to re-open and let me know if it still isn't working. |
That sounds even better. |
I think this needs to be reopened because the current types do not work for the "not" matcher Using Results in
for the .spec.ts file below function hello() {
return 'world';
}
describe( 'hello-world', () => {
it( 'hello invalid', async () => {
const v = hello();
expect( v )
.not.toBeNil()
.toHaveLength( 5 );
} );
it( 'hello valid', async () => {
const v = hello();
expect( v )
.toBeString()
.toHaveLength( 5 );
} );
} ); |
Oh yeah, they did rearrange things a bit in |
I made a Stackblitz project to reproduce the problem quickly https://stackblitz.com/edit/typescript-c4nmax Error in Stackblitz: Locally: |
Just published https://www.npmjs.com/package/jest-chain/v/1.1.5 with @dobesv's fix. Hope you don't mind @dobesv that I copied the solution from this PR and didn't merge, I didn't fancy dealing with the merge conflicts in package.json/yarn.lock |
No problem, thanks! |
Note that this change is not backward-compatible, this will not work with older versions of @types/jest.