-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(utils): increase test coverage chunk 2
- Loading branch information
Arturo Riveron Borodovisina
committed
Mar 24, 2022
1 parent
679d32e
commit 68f3b7e
Showing
25 changed files
with
1,172 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* @flow */ | ||
|
||
import { awaitKey } from '../../../src'; | ||
|
||
describe('awaitKey cases', () => { | ||
it('awaitKey should return the value when existing', () => { | ||
const obj = { | ||
custom: true | ||
}; | ||
const result = awaitKey(obj, 'custom'); | ||
|
||
if (!result) { | ||
throw new Error(`should return "true", but got: ${ result }`); | ||
} | ||
}); | ||
|
||
it('awaitKey should return the configured value when does not exists', () => { | ||
const obj = {}; | ||
|
||
awaitKey(obj, 'custom'); | ||
obj.custom = 'result'; | ||
const result = obj.custom; | ||
|
||
if (result !== 'result') { | ||
throw new Error(`should return "result", but got: ${ result }`); | ||
} | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.