Skip to content

Commit

Permalink
A more accurate interface snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed Jan 10, 2024
1 parent cb98232 commit 5c23d8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion scripts/test/procedure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

failures=0

node --expose-gc node_modules/.bin/jest --verbose
node --expose-gc node_modules/.bin/jest --verbose $@
failures=$((failures + $?))

echo $(which es-check)
Expand Down
20 changes: 10 additions & 10 deletions tests/spec/__snapshots__/test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,43 @@ exports[`isbot module interface interface is as expected 1`] = `
[
[
"pattern",
"object",
"RegExp",
],
[
"list",
"object",
"Array",
],
[
"isbotNaive",
"function",
"Function",
],
[
"isbot",
"function",
"Function",
],
[
"createIsbot",
"function",
"Function",
],
[
"createIsbotFromList",
"function",
"Function",
],
[
"isbotMatch",
"function",
"Function",
],
[
"isbotMatches",
"function",
"Function",
],
[
"isbotPattern",
"function",
"Function",
],
[
"isbotPatterns",
"function",
"Function",
],
]
`;
2 changes: 1 addition & 1 deletion tests/spec/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe("isbot", () => {
describe("module interface", () => {
test("interface is as expected", async () => {
const types = Object.entries(await import("../../src/index")).map(
([key, value]) => [key, typeof value] as [string, string],
([key, value]) => [key, value.constructor.name] as [string, string],
);
expect(types).toMatchSnapshot();
});
Expand Down

0 comments on commit 5c23d8a

Please sign in to comment.