deepKeys
should not return not existed keys
it("deepKeys should return correct values for sparsed arrays", () => {
// fixture setup
// eslint-disable-next-line no-sparse-arrays
const mockedData = [1, , 3];
const expectedState = Object.keys(mockedData).map(k => `[${k}]`);
const sut = () => deepKeys(mockedData);
// exercise system
const actualResult = sut();
// verify outcome
expect(actualResult).toEqual(expectedState);
});
- Expected - 0
+ Received + 1
Array [
"[0]",
+ "[1]",
"[2]",
]Jest
related to #108
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4