[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.

perf: remove chai as a direct dependency, keep it in `@vitest/expect` (#8461)

authored by

Vladimir and committed by
GitHub
(Aug 25, 2025, 2:02 PM +0200) cc98c611 903815d4

+34 -148
+6 -134
pnpm-lock.yaml
··· 58 58 specifier: ^6.7.14 59 59 version: 6.7.14 60 60 chai: 61 - specifier: ^5.2.1 62 - version: 5.2.1 61 + specifier: ^6.0.1 62 + version: 6.0.1 63 63 debug: 64 64 specifier: ^4.4.1 65 65 version: 4.4.1 ··· 653 653 version: link:../utils 654 654 chai: 655 655 specifier: 'catalog:' 656 - version: 5.2.1 656 + version: 6.0.1 657 657 tinyrainbow: 658 658 specifier: 'catalog:' 659 659 version: 2.0.0 ··· 661 661 '@vitest/runner': 662 662 specifier: workspace:* 663 663 version: link:../runner 664 - rollup-plugin-copy: 665 - specifier: ^3.5.0 666 - version: 3.5.0 667 664 668 665 packages/mocker: 669 666 dependencies: ··· 924 921 925 922 packages/vitest: 926 923 dependencies: 927 - '@types/chai': 928 - specifier: 'catalog:' 929 - version: 5.2.2 930 924 '@vitest/browser': 931 925 specifier: workspace:* 932 926 version: link:../browser ··· 954 948 '@vitest/utils': 955 949 specifier: workspace:* 956 950 version: link:../utils 957 - chai: 958 - specifier: 'catalog:' 959 - version: 5.2.1 960 951 debug: 961 952 specifier: 'catalog:' 962 953 version: 4.4.1 ··· 3963 3954 '@types/estree@1.0.8': 3964 3955 resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} 3965 3956 3966 - '@types/fs-extra@8.1.3': 3967 - resolution: {integrity: sha512-7IdV01N0u/CaVO0fuY1YmEg14HQN3+EW8mpNgg6NEfxEl/lzCa5OxlBu3iFsCAdamnYOcTQ7oEi43Xc/67Rgzw==} 3968 - 3969 - '@types/glob@7.2.0': 3970 - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} 3971 - 3972 3957 '@types/hast@3.0.4': 3973 3958 resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} 3974 3959 ··· 3998 3983 3999 3984 '@types/mdast@4.0.3': 4000 3985 resolution: {integrity: sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==} 4001 - 4002 - '@types/minimatch@5.1.1': 4003 - resolution: {integrity: sha512-v55NF6Dz0wrj14Rn8iEABTWrhYRmgkJYuokduunSiq++t3hZ9VZ6dvcDt+850Pm5sGJZk8RaHzkFCXPxVINZ+g==} 4004 3986 4005 3987 '@types/ms@0.7.31': 4006 3988 resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} ··· 4643 4625 array-flatten@1.1.1: 4644 4626 resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} 4645 4627 4646 - array-union@2.1.0: 4647 - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} 4648 - engines: {node: '>=8'} 4649 - 4650 4628 arraybuffer.prototype.slice@1.0.3: 4651 4629 resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} 4652 4630 engines: {node: '>= 0.4'} 4653 4631 4654 4632 asap@2.0.6: 4655 4633 resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} 4656 - 4657 - assertion-error@2.0.1: 4658 - resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} 4659 - engines: {node: '>=12'} 4660 4634 4661 4635 ast-types@0.13.4: 4662 4636 resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} ··· 4869 4843 engines: {node: '>=4'} 4870 4844 deprecated: 'functionality of this lib is built-in to chai now. see more details here: https://github.com/debitoor/chai-subset/pull/85' 4871 4845 4872 - chai@5.2.1: 4873 - resolution: {integrity: sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==} 4846 + chai@6.0.1: 4847 + resolution: {integrity: sha512-/JOoU2//6p5vCXh00FpNgtlw0LjvhGttaWc+y7wpW9yjBm3ys0dI8tSKZxIOgNruz5J0RleccatSIC3uxEZP0g==} 4874 4848 engines: {node: '>=18'} 4875 4849 4876 4850 chalk@4.1.2: ··· 4904 4878 4905 4879 chardet@0.7.0: 4906 4880 resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} 4907 - 4908 - check-error@2.1.1: 4909 - resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} 4910 - engines: {node: '>= 16'} 4911 4881 4912 4882 cheerio-select@2.1.0: 4913 4883 resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} ··· 4966 4936 color@4.2.3: 4967 4937 resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} 4968 4938 engines: {node: '>=12.5.0'} 4969 - 4970 - colorette@1.4.0: 4971 - resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} 4972 4939 4973 4940 colorette@2.0.20: 4974 4941 resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} ··· 5248 5215 decode-named-character-reference@1.0.2: 5249 5216 resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} 5250 5217 5251 - deep-eql@5.0.1: 5252 - resolution: {integrity: sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==} 5253 - engines: {node: '>=6'} 5254 - 5255 5218 deep-equal@2.2.3: 5256 5219 resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} 5257 5220 engines: {node: '>= 0.4'} ··· 5329 5292 diff-sequences@29.6.3: 5330 5293 resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} 5331 5294 engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} 5332 - 5333 - dir-glob@3.0.1: 5334 - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} 5335 - engines: {node: '>=8'} 5336 5295 5337 5296 dom-accessibility-api@0.5.16: 5338 5297 resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} ··· 6062 6021 resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} 6063 6022 engines: {node: '>= 0.4'} 6064 6023 6065 - globby@10.0.1: 6066 - resolution: {integrity: sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==} 6067 - engines: {node: '>=8'} 6068 - 6069 6024 globrex@0.1.2: 6070 6025 resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} 6071 6026 ··· 6381 6336 is-plain-obj@4.1.0: 6382 6337 resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} 6383 6338 engines: {node: '>=12'} 6384 - 6385 - is-plain-object@3.0.1: 6386 - resolution: {integrity: sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g==} 6387 - engines: {node: '>=0.10.0'} 6388 6339 6389 6340 is-potential-custom-element-name@1.0.1: 6390 6341 resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} ··· 6778 6729 loose-envify@1.4.0: 6779 6730 resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} 6780 6731 hasBin: true 6781 - 6782 - loupe@3.1.4: 6783 - resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==} 6784 6732 6785 6733 loupe@3.2.0: 6786 6734 resolution: {integrity: sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==} ··· 7404 7352 resolution: {integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==} 7405 7353 engines: {node: '>=16'} 7406 7354 7407 - path-type@4.0.0: 7408 - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} 7409 - engines: {node: '>=8'} 7410 - 7411 7355 pathe@1.1.2: 7412 7356 resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} 7413 7357 7414 7358 pathe@2.0.3: 7415 7359 resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} 7416 - 7417 - pathval@2.0.0: 7418 - resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} 7419 - engines: {node: '>= 14.16'} 7420 7360 7421 7361 pend@1.2.0: 7422 7362 resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} ··· 7790 7730 engines: {node: 20 || >=22} 7791 7731 hasBin: true 7792 7732 7793 - rollup-plugin-copy@3.5.0: 7794 - resolution: {integrity: sha512-wI8D5dvYovRMx/YYKtUNt3Yxaw4ORC9xo6Gt9t22kveWz1enG9QrhVlagzwrxSC455xD1dHMKhIJkbsQ7d48BA==} 7795 - engines: {node: '>=8.3'} 7796 - 7797 7733 rollup-plugin-dts@6.2.1: 7798 7734 resolution: {integrity: sha512-sR3CxYUl7i2CHa0O7bA45mCrgADyAQ0tVtGSqi3yvH28M+eg1+g5d7kQ9hLvEz5dorK3XVsH5L2jwHLQf72DzA==} 7799 7735 engines: {node: '>=16'} ··· 8076 8012 8077 8013 sisteransi@1.0.5: 8078 8014 resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} 8079 - 8080 - slash@3.0.0: 8081 - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} 8082 - engines: {node: '>=8'} 8083 8015 8084 8016 smart-buffer@4.2.0: 8085 8017 resolution: {integrity: sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==} ··· 11525 11457 11526 11458 '@types/estree@1.0.8': {} 11527 11459 11528 - '@types/fs-extra@8.1.3': 11529 - dependencies: 11530 - '@types/node': 22.16.5 11531 - 11532 - '@types/glob@7.2.0': 11533 - dependencies: 11534 - '@types/minimatch': 5.1.1 11535 - '@types/node': 22.16.5 11536 - 11537 11460 '@types/hast@3.0.4': 11538 11461 dependencies: 11539 11462 '@types/unist': 3.0.2 ··· 11576 11499 '@types/mdast@4.0.3': 11577 11500 dependencies: 11578 11501 '@types/unist': 3.0.2 11579 - 11580 - '@types/minimatch@5.1.1': {} 11581 11502 11582 11503 '@types/ms@0.7.31': {} 11583 11504 ··· 12344 12265 12345 12266 array-flatten@1.1.1: {} 12346 12267 12347 - array-union@2.1.0: {} 12348 - 12349 12268 arraybuffer.prototype.slice@1.0.3: 12350 12269 dependencies: 12351 12270 array-buffer-byte-length: 1.0.1 ··· 12358 12277 is-shared-array-buffer: 1.0.3 12359 12278 12360 12279 asap@2.0.6: {} 12361 - 12362 - assertion-error@2.0.1: {} 12363 12280 12364 12281 ast-types@0.13.4: 12365 12282 dependencies: ··· 12618 12535 12619 12536 chai-subset@1.6.0: {} 12620 12537 12621 - chai@5.2.1: 12622 - dependencies: 12623 - assertion-error: 2.0.1 12624 - check-error: 2.1.1 12625 - deep-eql: 5.0.1 12626 - loupe: 3.1.4 12627 - pathval: 2.0.0 12538 + chai@6.0.1: {} 12628 12539 12629 12540 chalk@4.1.2: 12630 12541 dependencies: ··· 12675 12586 character-entities@2.0.2: {} 12676 12587 12677 12588 chardet@0.7.0: {} 12678 - 12679 - check-error@2.1.1: {} 12680 12589 12681 12590 cheerio-select@2.1.0: 12682 12591 dependencies: ··· 12756 12665 dependencies: 12757 12666 color-convert: 2.0.1 12758 12667 color-string: 1.9.1 12759 - 12760 - colorette@1.4.0: {} 12761 12668 12762 12669 colorette@2.0.20: {} 12763 12670 ··· 13013 12920 dependencies: 13014 12921 character-entities: 2.0.2 13015 12922 13016 - deep-eql@5.0.1: {} 13017 - 13018 12923 deep-equal@2.2.3: 13019 12924 dependencies: 13020 12925 array-buffer-byte-length: 1.0.1 ··· 13095 13000 wrappy: 1.0.2 13096 13001 13097 13002 diff-sequences@29.6.3: {} 13098 - 13099 - dir-glob@3.0.1: 13100 - dependencies: 13101 - path-type: 4.0.0 13102 13003 13103 13004 dom-accessibility-api@0.5.16: {} 13104 13005 ··· 14115 14016 define-properties: 1.2.1 14116 14017 gopd: 1.2.0 14117 14018 14118 - globby@10.0.1: 14119 - dependencies: 14120 - '@types/glob': 7.2.0 14121 - array-union: 2.1.0 14122 - dir-glob: 3.0.1 14123 - fast-glob: 3.3.3 14124 - glob: 7.2.3 14125 - ignore: 5.3.2 14126 - merge2: 1.4.1 14127 - slash: 3.0.0 14128 - 14129 14019 globrex@0.1.2: {} 14130 14020 14131 14021 glur@1.1.2: {} ··· 14417 14307 is-obj@1.0.1: {} 14418 14308 14419 14309 is-plain-obj@4.1.0: {} 14420 - 14421 - is-plain-object@3.0.1: {} 14422 14310 14423 14311 is-potential-custom-element-name@1.0.1: {} 14424 14312 ··· 14803 14691 loose-envify@1.4.0: 14804 14692 dependencies: 14805 14693 js-tokens: 4.0.0 14806 - 14807 - loupe@3.1.4: {} 14808 14694 14809 14695 loupe@3.2.0: {} 14810 14696 ··· 15652 15538 15653 15539 path-to-regexp@8.2.0: {} 15654 15540 15655 - path-type@4.0.0: {} 15656 - 15657 15541 pathe@1.1.2: {} 15658 15542 15659 15543 pathe@2.0.3: {} 15660 - 15661 - pathval@2.0.0: {} 15662 15544 15663 15545 pend@1.2.0: {} 15664 15546 ··· 16048 15930 glob: 11.0.0 16049 15931 package-json-from-dist: 1.0.0 16050 15932 16051 - rollup-plugin-copy@3.5.0: 16052 - dependencies: 16053 - '@types/fs-extra': 8.1.3 16054 - colorette: 1.4.0 16055 - fs-extra: 8.1.0 16056 - globby: 10.0.1 16057 - is-plain-object: 3.0.1 16058 - 16059 15933 rollup-plugin-dts@6.2.1(rollup@4.46.1)(typescript@5.8.3): 16060 15934 dependencies: 16061 15935 magic-string: 0.30.17 ··· 16401 16275 totalist: 3.0.0 16402 16276 16403 16277 sisteransi@1.0.5: {} 16404 - 16405 - slash@3.0.0: {} 16406 16278 16407 16279 smart-buffer@4.2.0: {} 16408 16280
+1 -1
pnpm-workspace.yaml
··· 24 24 acorn-walk: ^8.3.4 25 25 birpc: ^2.5.0 26 26 cac: ^6.7.14 27 - chai: ^5.2.1 27 + chai: ^6.0.1 28 28 debug: ^4.4.1 29 29 flatted: ^3.3.3 30 30 istanbul-lib-coverage: ^3.2.2
+1 -2
packages/expect/package.json
··· 40 40 "tinyrainbow": "catalog:" 41 41 }, 42 42 "devDependencies": { 43 - "@vitest/runner": "workspace:*", 44 - "rollup-plugin-copy": "^3.5.0" 43 + "@vitest/runner": "workspace:*" 45 44 } 46 45 }
-2
packages/vitest/package.json
··· 156 156 } 157 157 }, 158 158 "dependencies": { 159 - "@types/chai": "catalog:", 160 159 "@vitest/expect": "workspace:*", 161 160 "@vitest/mocker": "workspace:*", 162 161 "@vitest/pretty-format": "workspace:^", ··· 164 163 "@vitest/snapshot": "workspace:*", 165 164 "@vitest/spy": "workspace:*", 166 165 "@vitest/utils": "workspace:*", 167 - "chai": "catalog:", 168 166 "debug": "catalog:", 169 167 "es-module-lexer": "^1.7.0", 170 168 "expect-type": "^1.2.2",
+18 -2
packages/expect/src/index.ts
··· 1 - export * from './constants' 1 + export { 2 + ASYMMETRIC_MATCHERS_OBJECT, 3 + GLOBAL_EXPECT, 4 + JEST_MATCHERS_OBJECT, 5 + MATCHERS_OBJECT, 6 + } from './constants' 2 7 export { customMatchers } from './custom-matchers' 3 - export * from './jest-asymmetric-matchers' 8 + export type { AsymmetricMatcherInterface } from './jest-asymmetric-matchers' 9 + export { 10 + Any, 11 + Anything, 12 + ArrayContaining, 13 + AsymmetricMatcher, 14 + JestAsymmetricMatchers, 15 + ObjectContaining, 16 + StringContaining, 17 + StringMatching, 18 + } from './jest-asymmetric-matchers' 4 19 export { JestChaiExpect } from './jest-expect' 5 20 export { JestExtend } from './jest-extend' 6 21 export { addCustomEqualityTesters } from './jest-matcher-utils' 7 22 export * from './jest-utils' 8 23 export { getState, setState } from './state' 9 24 export * from './types' 25 + export * as chai from 'chai'
+2 -2
packages/browser/src/node/plugin.ts
··· 275 275 const include = [ 276 276 'vitest > expect-type', 277 277 'vitest > @vitest/snapshot > magic-string', 278 - 'vitest > chai', 279 - 'vitest > chai > loupe', 280 278 'vitest > @vitest/runner > strip-literal', 279 + 'vitest > @vitest/expect > chai', 280 + 'vitest > @vitest/expect > chai > loupe', 281 281 'vitest > @vitest/utils > loupe', 282 282 '@vitest/browser > @testing-library/user-event', 283 283 '@vitest/browser > @testing-library/dom',
+1 -1
packages/vitest/src/integrations/chai/config.ts
··· 1 - import * as chai from 'chai' 1 + import { chai } from '@vitest/expect' 2 2 3 3 export function setupChaiConfig(config: ChaiConfig): void { 4 4 Object.assign(chai.config, config)
+3 -2
packages/vitest/src/integrations/chai/index.ts
··· 3 3 import { 4 4 addCustomEqualityTesters, 5 5 ASYMMETRIC_MATCHERS_OBJECT, 6 + chai, 6 7 customMatchers, 7 8 getState, 8 9 GLOBAL_EXPECT, ··· 10 11 } from '@vitest/expect' 11 12 import { getCurrentTest } from '@vitest/runner' 12 13 import { getTestName } from '@vitest/runner/utils' 13 - import * as chai from 'chai' 14 14 import { getCurrentEnvironment, getWorkerState } from '../../runtime/utils' 15 15 import { createExpectPoll } from './poll' 16 16 import './setup' ··· 121 121 configurable: true, 122 122 }) 123 123 124 - export { assert, should } from 'chai' 124 + export const assert: Chai.Assert = chai.assert 125 + export const should: () => Chai.Should = chai.should 125 126 export { chai, globalExpect as expect }
+1 -1
packages/vitest/src/integrations/chai/poll.ts
··· 1 1 import type { Assertion, ExpectStatic } from '@vitest/expect' 2 2 import type { Test } from '@vitest/runner' 3 + import { chai } from '@vitest/expect' 3 4 import { getSafeTimers } from '@vitest/utils' 4 - import * as chai from 'chai' 5 5 import { getWorkerState } from '../../runtime/utils' 6 6 7 7 // these matchers are not supported because they don't make sense with poll
+1 -1
packages/vitest/src/integrations/chai/setup.ts
··· 1 1 import { 2 + chai, 2 3 JestAsymmetricMatchers, 3 4 JestChaiExpect, 4 5 JestExtend, 5 6 } from '@vitest/expect' 6 - import * as chai from 'chai' 7 7 import Subset from 'chai-subset' 8 8 import { SnapshotPlugin } from '../snapshot/chai' 9 9