-
-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
💪 phase/solvedPost is donePost is done📚 area/docsThis affects documentationThis affects documentation
Description
is and is.convert()() do not have the same behavior.
The function created through convert() do not have the same results as calling is() directly, even when using the same tests.
I've rewritten all tests from is() to convert()() at Roang-zero1/unist-util-is/tree/convert-test. Running these tests failes 14 tests (e.g. for invalid index).
Steps to reproduce
git clone https://github.com/Roang-zero1/unist-util-is.git
npm install
npm run testExpected behaviour
From my understanding is() and convert()() should be equivalent.
Actual behaviour
is(node, null, -1) throws and error while
const testNull = convert(null)
testNull(node, -1)returns undefined.
Metadata
Metadata
Assignees
Labels
💪 phase/solvedPost is donePost is done📚 area/docsThis affects documentationThis affects documentation