deepKeys doesn't work with sparsed arrays: ".for is not iterable"
AuthorProxy opened this issue · comments
Alex Kostyukov commented
deepKeys doesn't work with sparsed arrays
it("deepKeys should not cause an error with sparsed arrays", () => {
// fixture setup
const mockedEntity = {
// eslint-disable-next-line no-sparse-arrays
open_hours: [1, , 3],
};
const sut = () => {
deepKeys(mockedEntity);
};
// exercise system
// verify outcome
expect(sut).not.toThrow();
});
Error name: "TypeError"
Error message: ".for is not iterable"
Alex Kostyukov commented
@sindresorhus you fixed it but it doesn't work correctly, check #110