Skip to content

Commit

Permalink
feat: toHaveBeenCalledWith without args
Browse files Browse the repository at this point in the history
  • Loading branch information
Diana Suvorova authored and Nicolas Fernandez committed Jul 23, 2017
1 parent accfe8a commit 80bb8cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/rules/prefer-toHaveBeenCalledWith.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ describe("", function() {
});
```

```js
describe("", function() {
it("", function() {
f();
expect(f).toHaveBeenCalledWith();
});
});
```

```js
describe("", function() {
it("", function() {
Expand Down
9 changes: 9 additions & 0 deletions test/rules/prefer-toHaveBeenCalledWith.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ eslintTester.run('prefer toHaveBeenCalledWith', rule, {
' });',
'});'
]),
linesToCode([
'describe("", function() {',
' it("", function(){',
'',
' f();',
' expect(f).toHaveBeenCalledWith()',
' });',
'});'
]),
linesToCode([
'describe("", function() {',
' it("", function(){',
Expand Down

0 comments on commit 80bb8cd

Please sign in to comment.