chore(deps): bump vitest from 1.5.2/2.0.5 to 2.1.1, fix unit test failing in Vitest 2 (#608)

* chore(deps): bump vitest from 1.5.2/2.0.5 to 2.1.1

* chore: fix unit test failing in Vitest 2

* Add timeout

---------

Co-authored-by: Sojin Park <raon0211@gmail.com>
This commit is contained in:
Wojciech Maj 2024-10-01 15:31:26 +02:00 committed by GitHub
parent bc490b6e65
commit 1bda274c7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 195 additions and 508 deletions

View File

@ -9,7 +9,7 @@
"esbuild": "0.23.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"vitest": "^2.0.5"
"vitest": "^2.1.1"
},
"devDependencies": {
"@types/lodash": "^4",

View File

@ -143,7 +143,7 @@
"@types/jscodeshift": "^0.11.11",
"@types/node": "^20.12.11",
"@types/tar": "^6.1.13",
"@vitest/coverage-istanbul": "^1.5.2",
"@vitest/coverage-istanbul": "^2.1.1",
"@vue/compiler-sfc": "^3.5.10",
"broken-link-checker": "^0.7.8",
"eslint": "^9.9.0",
@ -163,7 +163,7 @@
"tsx": "^4.19.0",
"typescript": "^5.4.5",
"typescript-eslint": "^8.1.0",
"vitest": "^1.5.2"
"vitest": "^2.1.1"
},
"dependenciesMeta": {
"@trivago/prettier-plugin-sort-imports@4.3.0": {

View File

@ -55,7 +55,13 @@ describe('cloneDeep', () => {
it(`should clone arguments objects`, () => {
const actual = cloneDeep(args);
expect(actual).toEqual(args);
// Arguments objects equality doesn't work properly in Vitest 2, so we need to check the properties manually
expect(actual).toHaveProperty('0', 1);
expect(actual).toHaveProperty('1', 2);
expect(actual).toHaveProperty('2', 3);
expect(actual).toHaveProperty('length', 3);
expect(actual[Symbol.iterator]).toBe(args[Symbol.iterator]);
expect(actual).not.toBe(args);
});

View File

@ -43,7 +43,7 @@ describe(`es-toolkit's package tarball`, () => {
expect(entrypoints).toEqual([...ENTRYPOINTS, './package.json']);
},
{ timeout: 60_000 }
{ timeout: 120_000 }
);
it(

687
yarn.lock

File diff suppressed because it is too large Load Diff