Skip to content

Commit

Permalink
fix: avoid chaijs/deep-eql#85
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Jun 1, 2022
1 parent 5354216 commit 4ab1cda
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"resolutions": {},
"dependencies": {
"debug-color2": "^1.2.7",
"deep-eql": "^4.0.1",
"deep-eql": "= 4.0.0",
"strip-ansi": "<7 >=6",
"tslib": "^2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/array-hyper-unique/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"tsc:showConfig": "ynpx get-current-tsconfig -p"
},
"dependencies": {
"deep-eql": "^4.0.1",
"deep-eql": "= 4.0.0",
"lodash": "^4.17.21",
"tslib": "^2"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`bug-symbol.spec TypeError: Cannot convert a Symbol value to a string 1`] = `
Array [
"https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.on.fleek.co/",
"https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.ipfs.dweb.link/",
]
`;
33 changes: 33 additions & 0 deletions packages/array-hyper-unique/test/bug-symbol.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//@noUnusedParameters:false

import { basename, extname } from 'path';
import { array_unique } from '../src/index';

beforeAll(async () =>
{

});

describe(basename(__filename, extname(__filename)), () =>
{

test.skip(`dummy`, () => {});

test(`TypeError: Cannot convert a Symbol value to a string`, () =>
{
const list = [
new URL(`https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.on.fleek.co/`),
new URL(`https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.on.fleek.co/`),

new URL(`https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.ipfs.dweb.link/`),
new URL(`https://bafybeicm5clh7fl4up4prnbfqksou6vsp5voth54rcsxhsjysimm3o77fq.ipfs.dweb.link/`),

];

let actual = array_unique(list);

expect(actual).toMatchSnapshot();

});

})

0 comments on commit 4ab1cda

Please sign in to comment.