Simplified code making it easier to read

This commit is contained in:
Alejandro Celaya
2019-04-19 12:52:55 +02:00
parent 28ca54547e
commit 33d67cbe3d
8 changed files with 40 additions and 74 deletions

View File

@@ -92,7 +92,7 @@ describe('<EditTagsModal />', () => {
saveBtn.simulate('click');
expect(editShortUrlTags).toHaveBeenCalledTimes(1);
expect(editShortUrlTags.mock.calls[0]).toEqual([ shortCode, []]);
expect(editShortUrlTags).toHaveBeenCalledWith(shortCode, []);
// Wrap this expect in a setImmediate since it is called as a result of an inner promise
setImmediate(() => {
@@ -130,7 +130,7 @@ describe('<EditTagsModal />', () => {
setImmediate(() => {
modal.simulate('closed');
expect(shortUrlTagsEdited).toHaveBeenCalledTimes(1);
expect(shortUrlTagsEdited.mock.calls[0]).toEqual([ shortCode, []]);
expect(shortUrlTagsEdited).toHaveBeenCalledWith(shortCode, []);
done();
});
});