sazerac
sazerac copied to clipboard
Symbol keys
Currently it seems that symbols are simply ignored. Is this intended behavior? Wouldn't it make more sense to check them too? I would certainly appreciate it.
MWE:
// Object.assign() assigns symbols so this test should fail but it passes.
test(Object.assign, (): void => {
const SYMBOL_KEY = Symbol("key");
given({}, { [SYMBOL_KEY]: true }).expect({});
});
That seems reasonable. I haven't looked at this part of the code in a while (if ever!) and I'm not sure how the expectations are implemented. I imagine they are mostly delegated though I'm not sure.
Pull request welcome!