Skip to content

Commit

Permalink
test: add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 14, 2018
1 parent 4651b68 commit 6f02ae9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions rules/__tests__/prefer_expect_assertions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,22 @@ ruleTester.run('prefer-expect-assertions', rules['prefer-expect-assertions'], {
],

valid: [
{
code: 'test("it1", () => {expect.assertions(0);})',
},
'test("it1", () => {expect.assertions(0);})',
'test("it1", function() {expect.assertions(0);})',
'test("it1", function() {expect.hasAssertions();})',
'it("it1", function() {expect.assertions(0);})',
'it("it1", function() {\n\t\t\texpect.assertions(1);' +
'\n\t\t\texpect(someValue).toBe(true)\n' +
'\t\t\t})',
'test("it1")',
`
test('later return', () => {
const promise = something().then(value => {
expect(value).toBe('red');
});
return promise;
});
`,
],
});

0 comments on commit 6f02ae9

Please # to comment.