This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Config Set: Test isolation / validation #2902
Labels
exp/novice
Someone with a little familiarity can pick up
help wanted
Seeking public contribution on this issue
kind/enhancement
A net-new feature or improvement to an existing feature
kind/resolved-in-helia
Currently
.config.set should fail on non valid value
is the only test that does not run in isolation (fromjs-ipfs-api
undergo-ipfs v0.4.15
🎉)However, I don't believe it's really testing what we want it to be testing. It appears it's trying to produce an error by passing an invalid type, similar to the
non valid key
test above it.https://github.com/ipfs/interface-ipfs-core/blob/ef910266b36c89fe21f9821f86bdb9955d60b468/js/src/config/set.js#L75-L87
The issue is that a
Buffer
does not raise this error, astypeof <Buffer>
isobject
. It also passes JSON serialization. The only reason this test passed was because the daemon it self rejected the type due to being set by a prior test.https://github.com/ipfs/interface-ipfs-core/blob/ef910266b36c89fe21f9821f86bdb9955d60b468/js/src/config/set.js#L32-L41
I don't believe this is what is expected to be under test though.
js-ipfs-api
probably needs to reject buffers.js-ipfs-repo
The text was updated successfully, but these errors were encountered: