Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jest-community/eslint-plugin-jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v23.8.1
Choose a base ref
...
head repository: jest-community/eslint-plugin-jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v23.8.2
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Mar 6, 2020

  1. fix(prefer-to-contain): check that expect argument is defined before …

    …use (#542)
    
    * fix(prefer-to-contain): check that expect argument is defined before use
    
    * chore: regenerate `yarn.lock`
    G-Rath authored Mar 6, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    56f909b View commit details
  2. chore(release): 23.8.2 [skip ci]

    ## [23.8.2](v23.8.1...v23.8.2) (2020-03-06)
    
    ### Bug Fixes
    
    * **prefer-to-contain:** check that expect argument is defined before use ([#542](#542)) ([56f909b](56f909b))
    semantic-release-bot committed Mar 6, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    SimenB Simen Bekkhus
    Copy the full SHA
    95ca6d9 View commit details
Showing with 539 additions and 413 deletions.
  1. +8 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +1 −0 src/rules/__tests__/prefer-to-contain.test.ts
  4. +1 −0 src/rules/prefer-to-contain.ts
  5. +528 −412 yarn.lock
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [23.8.2](https://github.com/jest-community/eslint-plugin-jest/compare/v23.8.1...v23.8.2) (2020-03-06)

### Bug Fixes

- **prefer-to-contain:** check that expect argument is defined before use
([#542](https://github.com/jest-community/eslint-plugin-jest/issues/542))
([56f909b](https://github.com/jest-community/eslint-plugin-jest/commit/56f909b326034236953d04b18dab3f64b16a2973))

## [23.8.1](https://github.com/jest-community/eslint-plugin-jest/compare/v23.8.0...v23.8.1) (2020-02-29)

### Bug Fixes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-jest",
"version": "23.8.1",
"version": "23.8.2",
"description": "Eslint rules for Jest",
"repository": "jest-community/eslint-plugin-jest",
"license": "MIT",
1 change: 1 addition & 0 deletions src/rules/__tests__/prefer-to-contain.test.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ const ruleTester = new TSESLint.RuleTester();

ruleTester.run('prefer-to-contain', rule, {
valid: [
'expect().toBe(false);',
'expect(a).toContain(b);',
"expect(a.name).toBe('b');",
'expect(a).toBe(true);',
1 change: 1 addition & 0 deletions src/rules/prefer-to-contain.ts
Original file line number Diff line number Diff line change
@@ -187,6 +187,7 @@ export default createRule({

if (
!matcher ||
!includesCall ||
(modifier && modifier.name !== ModifierName.not) ||
!isBooleanEqualityMatcher(matcher) ||
!isFixableIncludesCallExpression(includesCall)
940 changes: 528 additions & 412 deletions yarn.lock

Large diffs are not rendered by default.