[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

refactor: remove chai-subset (#8586)

authored by

Bjorn Lu and committed by
GitHub
(Sep 18, 2025, 9:19 AM +0200) 500aa480 2e0630b7

+1 -67
-10
pnpm-lock.yaml
··· 1021 1021 cac: 1022 1022 specifier: 'catalog:' 1023 1023 version: 6.7.14(patch_hash=a8f0f3517a47ce716ed90c0cfe6ae382ab763b021a664ada2a608477d0621588) 1024 - chai-subset: 1025 - specifier: ^1.6.0 1026 - version: 1.6.0 1027 1024 find-up: 1028 1025 specifier: ^6.3.0 1029 1026 version: 6.3.0 ··· 4817 4814 4818 4815 ccount@2.0.1: 4819 4816 resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} 4820 - 4821 - chai-subset@1.6.0: 4822 - resolution: {integrity: sha512-K3d+KmqdS5XKW5DWPd5sgNffL3uxdDe+6GdnJh3AYPhwnBGRY5urfvfcbRtWIvvpz+KxkL9FeBB6MZewLUNwug==} 4823 - engines: {node: '>=4'} 4824 - deprecated: 'functionality of this lib is built-in to chai now. see more details here: https://github.com/debitoor/chai-subset/pull/85' 4825 4817 4826 4818 chai@6.0.1: 4827 4819 resolution: {integrity: sha512-/JOoU2//6p5vCXh00FpNgtlw0LjvhGttaWc+y7wpW9yjBm3ys0dI8tSKZxIOgNruz5J0RleccatSIC3uxEZP0g==} ··· 12833 12825 caniuse-lite@1.0.30001741: {} 12834 12826 12835 12827 ccount@2.0.1: {} 12836 - 12837 - chai-subset@1.6.0: {} 12838 12828 12839 12829 chai@6.0.1: {} 12840 12830
-29
packages/vitest/LICENSE.md
··· 280 280 281 281 --------------------------------------- 282 282 283 - ## chai-subset 284 - License: MIT 285 - By: Andrii Shumada, Robert Herhold 286 - Repository: https://github.com/debitoor/chai-subset.git 287 - 288 - > The MIT License (MIT) 289 - > 290 - > Copyright (c) 2014 291 - > 292 - > Permission is hereby granted, free of charge, to any person obtaining a copy 293 - > of this software and associated documentation files (the "Software"), to deal 294 - > in the Software without restriction, including without limitation the rights 295 - > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 296 - > copies of the Software, and to permit persons to whom the Software is 297 - > furnished to do so, subject to the following conditions: 298 - > 299 - > The above copyright notice and this permission notice shall be included in all 300 - > copies or substantial portions of the Software. 301 - > 302 - > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 303 - > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 304 - > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 305 - > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 306 - > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 307 - > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 308 - > SOFTWARE. 309 - 310 - --------------------------------------- 311 - 312 283 ## find-up 313 284 License: MIT 314 285 By: Sindre Sorhus
-1
packages/vitest/package.json
··· 195 195 "acorn-walk": "catalog:", 196 196 "birpc": "catalog:", 197 197 "cac": "catalog:", 198 - "chai-subset": "^1.6.0", 199 198 "find-up": "^6.3.0", 200 199 "flatted": "catalog:", 201 200 "happy-dom": "^18.0.1",
+1 -2
packages/browser/src/client/tsconfig.json
··· 12 12 "include": [ 13 13 "./**/*.ts", 14 14 "../types.ts", 15 - "../../matchers.d.ts", 16 - "../../../vitest/src/integrations/chai/chai-subset.d.ts" 15 + "../../matchers.d.ts" 17 16 ], 18 17 "exclude": [ 19 18 "./vite.config.ts"
-18
packages/vitest/src/types/global.ts
··· 4 4 import type { BenchmarkResult } from '../runtime/types/benchmark' 5 5 import type { UserConsoleLog } from './general' 6 6 7 - declare global { 8 - // eslint-disable-next-line ts/no-namespace 9 - namespace Chai { 10 - interface ContainSubset { 11 - (expected: any): Assertion 12 - } 13 - 14 - interface Assertion { 15 - containSubset: ContainSubset 16 - } 17 - 18 - interface Assert { 19 - // eslint-disable-next-line ts/method-signature-style 20 - containSubset(val: any, exp: any, msg?: string): void 21 - } 22 - } 23 - } 24 - 25 7 interface SnapshotMatcher<T> { 26 8 <U extends { [P in keyof T]: any }>( 27 9 snapshot: Partial<U>,
-5
packages/vitest/src/integrations/chai/chai-subset.d.ts
··· 1 - declare module 'chai-subset' { 2 - const chaiSubset: Chai.ChaiPlugin 3 - 4 - export = chaiSubset 5 - }
-2
packages/vitest/src/integrations/chai/setup.ts
··· 4 4 JestChaiExpect, 5 5 JestExtend, 6 6 } from '@vitest/expect' 7 - import Subset from 'chai-subset' 8 7 import { SnapshotPlugin } from '../snapshot/chai' 9 8 10 9 chai.use(JestExtend) 11 10 chai.use(JestChaiExpect) 12 - chai.use(Subset) 13 11 chai.use(SnapshotPlugin) 14 12 chai.use(JestAsymmetricMatchers)