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 d1416c2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions rules/__tests__/valid_expect_in_promise.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,22 @@ ruleTester.run('valid-expect-in-promise', rules['valid-expect-in-promise'], {
"it('it1', () => {return somePromise." +
'then(() => {expect(someThing).toEqual(true);})' +
'.catch(() => {expect(someThing).toEqual(false);})});',
`
test('later return', () => {
const promise = something().then(value => {
expect(value).toBe('red');
});
return promise;
});
`,
`
it('only checks the configured directories', () =>
something().then(value => {
expect(() => {
value();
}).toThrow();
}));
`,
],
});

0 comments on commit d1416c2

Please # to comment.