Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Mar 4, 2020
1 parent 28b2067 commit 0472c1f
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,15 @@ describe('AllRulesTable Columns', () => {
beforeEach(() => {
results = [];

reFetchRules.mockImplementation(
() =>
new Promise(resolve => {
results.push('reFetchRules');
resolve();
})
);
reFetchRules.mockImplementation(() => Promise.resolve(results.push('reFetchRules')));
});

test('duplicate rule onClick should call refetch after the rule is duplicated', async () => {
(duplicateRulesAction as jest.Mock).mockImplementation(
() =>
new Promise(resolve =>
setTimeout(() => {
results.push('duplicateRulesAction');
resolve();
resolve(results.push('duplicateRulesAction'));
}, 500)
)
);
Expand Down

0 comments on commit 0472c1f

Please sign in to comment.