diff --git a/package.json b/package.json index 1cee7ed..3534a44 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,13 @@ "lint": "rslint && prettier -c .", "lint:write": "rslint --fix && prettier -w .", "prepare": "simple-git-hooks", - "test": "playwright test", + "test": "rstest", "bump": "npx bumpp" }, "simple-git-hooks": { "pre-commit": "pnpm run lint:write" }, "devDependencies": { - "@playwright/test": "^1.61.1", "@rsbuild/core": "^2.1.2", "@rsbuild/plugin-less": "^1.6.4", "@rsbuild/plugin-sass": "^1.5.3", @@ -40,6 +39,8 @@ "@rsbuild/plugin-type-check": "^1.5.0", "@rslib/core": "^0.23.1", "@rslint/core": "^0.6.4", + "@rstest/core": "^0.11.1", + "@rstest/playwright": "^0.11.1", "@types/node": "^24.13.2", "line-diff": "2.1.2", "playwright": "^1.61.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28be276..f251275 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,30 +8,33 @@ importers: .: devDependencies: - '@playwright/test': - specifier: ^1.61.1 - version: 1.61.1 '@rsbuild/core': specifier: ^2.1.2 version: 2.1.2 '@rsbuild/plugin-less': specifier: ^1.6.4 - version: 1.6.4(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + version: 1.6.4(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rsbuild/plugin-sass': specifier: ^1.5.3 version: 1.5.3(@rsbuild/core@2.1.2) '@rsbuild/plugin-stylus': specifier: ^2.0.1 - version: 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23)) + version: 2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23)) '@rsbuild/plugin-type-check': specifier: ^1.5.0 - version: 1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) + version: 1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) '@rslib/core': specifier: ^0.23.1 version: 0.23.1(typescript@7.0.2) '@rslint/core': specifier: ^0.6.4 version: 0.6.4 + '@rstest/core': + specifier: ^0.11.1 + version: 0.11.1 + '@rstest/playwright': + specifier: ^0.11.1 + version: 0.11.1(@rstest/core@0.11.1)(playwright@1.61.1) '@types/node': specifier: ^24.13.2 version: 24.13.2 @@ -364,11 +367,6 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@playwright/test@1.61.1': - resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==} - engines: {node: '>=18'} - hasBin: true - '@rsbuild/core@2.1.2': resolution: {integrity: sha512-EP24Oj01bdwtw/Xl3LiaLe/WG6PBQV2yWbbCh+2TkMDc9dNHiyBTnR+/JZvGxI8RdO5qU0rH4YgMOJ6nVXIQSA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -379,6 +377,16 @@ packages: core-js: optional: true + '@rsbuild/core@2.1.5': + resolution: {integrity: sha512-7TW4U1SH7VxQZzSTIOzvwj5lo9uNTmGpsmTXFr4axQAE4giLDKP3kVUA1ZW4P3/Mz4QQJJyvZP29mVcb8kZCfg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + core-js: '>= 3.0.0' + peerDependenciesMeta: + core-js: + optional: true + '@rsbuild/plugin-less@1.6.4': resolution: {integrity: sha512-cDlxi6Ne0K8ZK4PrTy/wSli5RyGkT8I55j/e0R7ZBvriHM7JL0MaA28ceiKAqy70Hy/eZ/btHTB35Sl1FAor1g==} peerDependencies: @@ -485,69 +493,137 @@ packages: cpu: [arm64] os: [darwin] + '@rspack/binding-darwin-arm64@2.1.3': + resolution: {integrity: sha512-oOGI0RSL89Ehu9T22rugmfUY9OC2eBqLMeWRYsu7bhlUrjoXeVfGBBSEXCse666BQ1sAiM8hD/k7nqVria/okQ==} + cpu: [arm64] + os: [darwin] + '@rspack/binding-darwin-x64@2.1.2': resolution: {integrity: sha512-aoifkILvx/XEHyvg8yW57xu95nx7f9f/3ah1+RguHSNKcJMcoCep9VX1Ct1N0ftqg8MC0JUObc7xWL5W14hmjA==} cpu: [x64] os: [darwin] + '@rspack/binding-darwin-x64@2.1.3': + resolution: {integrity: sha512-sVqWXNiFTMXAyN362y6IA+eJc8LXZKfHdhEJ/zDuMmRp+u2IvhgaF8tk3vX/OmeB9jydVjySijuiqk8No/FoCA==} + cpu: [x64] + os: [darwin] + '@rspack/binding-linux-arm64-gnu@2.1.2': resolution: {integrity: sha512-My4m40tyJSgiCEf3bB2KIEX710q3nZg99LIjy+8Zxgi3oZTkg1bFmFRusFU5U4eN5408zfSqDDGvjDE3Yv7o4w==} cpu: [arm64] os: [linux] libc: [glibc] + '@rspack/binding-linux-arm64-gnu@2.1.3': + resolution: {integrity: sha512-aCy9Zli/2Qf+Ee5otXfFQ6mhv5fEyn0wIoBVmouqtJoqOO21et6UTtJ+LHLsMDolwGLyHERAljeSFSmYX3/O5A==} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-arm64-musl@2.1.2': resolution: {integrity: sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==} cpu: [arm64] os: [linux] libc: [musl] + '@rspack/binding-linux-arm64-musl@2.1.3': + resolution: {integrity: sha512-flIE7eluz0d21Fn28EVm3vPwoJooOSqtmjLFVSuOMcoCbwV9clfor195oIrAppp/W7dL/3XquFuVfrsa01Jy8Q==} + cpu: [arm64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-riscv64-gnu@2.1.2': resolution: {integrity: sha512-uys8Jyw8Z3ralvICbN/L/nZfy5qELIwpOY72rhIqhoDYwFcL4fmMaY7WsvUcJOjCB2rqOcWPaWKuF2oPvo9iDQ==} cpu: [riscv64] os: [linux] libc: [glibc] + '@rspack/binding-linux-riscv64-gnu@2.1.3': + resolution: {integrity: sha512-yojg8elye1nhsNeGncw0NrZ4pMGF7NVebR80CLg72TXyzfYwFJlFTdU5yUYb1Gy+JXIvrSCwzQt2QkyiEvmkfg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-riscv64-musl@2.1.2': resolution: {integrity: sha512-JYNVQwqCaRGQWvjHQYzZkIzQiwllMaJwh4Rdu3ww6W2OJcJUqT08sL1pkOtU0iCxT4VUYiRRcp93VGTGpHr8fg==} cpu: [riscv64] os: [linux] libc: [musl] + '@rspack/binding-linux-riscv64-musl@2.1.3': + resolution: {integrity: sha512-6PvbXb3FOK4X3S5QGvoSW/sqExmsvAoPnQ/YSFrXvTphkXFezA7wnobmGBHT8JQP31hcFRzJHIZSIOKktzSzzg==} + cpu: [riscv64] + os: [linux] + libc: [musl] + '@rspack/binding-linux-x64-gnu@2.1.2': resolution: {integrity: sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==} cpu: [x64] os: [linux] libc: [glibc] + '@rspack/binding-linux-x64-gnu@2.1.3': + resolution: {integrity: sha512-lMXjoGKf0SnviH596fmTszgtnXLHmWOoE90G8grG9MvKVa3pelRmfps5ewZL9s8ENf3NXRfOxIhIf/M9as6MqA==} + cpu: [x64] + os: [linux] + libc: [glibc] + '@rspack/binding-linux-x64-musl@2.1.2': resolution: {integrity: sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==} cpu: [x64] os: [linux] libc: [musl] + '@rspack/binding-linux-x64-musl@2.1.3': + resolution: {integrity: sha512-0esT35v7pW2ZsJTMc/zDUHwpNXlPqyUCyuiLJvrAAUcdENrgOVe4DmFrgVJ2hwqI4GjeN1VBnGRJ8c+edAHH5w==} + cpu: [x64] + os: [linux] + libc: [musl] + '@rspack/binding-wasm32-wasi@2.1.2': resolution: {integrity: sha512-EB4SqH8DW/E/OmqssNQvnIVGQiVUyYNlA/pcc6Ia4MlTNwu6eNDppcNLrToH+kSZpL4CpHSFfSM3eIsSuar2Rw==} cpu: [wasm32] + '@rspack/binding-wasm32-wasi@2.1.3': + resolution: {integrity: sha512-UsrDjD59UEP0mhfN/Z+uTc3vLgiUvIr+mn92WC1sbQi9gtZohTYvaQYFhWuMkBqsACGcmZp704JAbbSrVrVYCA==} + cpu: [wasm32] + '@rspack/binding-win32-arm64-msvc@2.1.2': resolution: {integrity: sha512-T6Fs/g32MRja/UpCq4AdyPRj8tA0cOkcEa4PrAcn/ztUgK8b/qMVxj5mhMI+n7k+kHZQnpeB1Q4HqdSJi6OocA==} cpu: [arm64] os: [win32] + '@rspack/binding-win32-arm64-msvc@2.1.3': + resolution: {integrity: sha512-42RS/SwKBTkNvXIPZXqTn0yEFN8zwGRfRe/ly0GDvPp/KxpLMFWxJmLxgtoLompU+0UCGvV4KpcBENt3oWs6BA==} + cpu: [arm64] + os: [win32] + '@rspack/binding-win32-ia32-msvc@2.1.2': resolution: {integrity: sha512-OtxkFVz14mVL4QK8QriSELn9B6PaYGHw1jGJwVDEzpu2ZxSHCTQPz9dVE1ekYtREEqZUkRU7Fp7VfhJSmjTt2Q==} cpu: [ia32] os: [win32] + '@rspack/binding-win32-ia32-msvc@2.1.3': + resolution: {integrity: sha512-thk43H1JHHbetNF3txcsGXeOwZi2m6Luf/uVUqNORXjxr5VV8woHAgaAx4QXVZRg70z1VDjd8mBWnHBnKI0FGA==} + cpu: [ia32] + os: [win32] + '@rspack/binding-win32-x64-msvc@2.1.2': resolution: {integrity: sha512-Am+nx9fLF3nzgD/K05Bs1Bb+WO8SFLWAYRbXkymaL1r+RQxjRj7jd5ap2PhGOCcfaNA4yVWkAFvmFP92eRu7bQ==} cpu: [x64] os: [win32] + '@rspack/binding-win32-x64-msvc@2.1.3': + resolution: {integrity: sha512-ObaUcj+BHo/aBL1weyM3orApaHyAR5Phr3YNEpQEifxjZbNKM1iO5X5prN4OqEv3H+7o5e/Wh9Fy3N7Vvd+psA==} + cpu: [x64] + os: [win32] + '@rspack/binding@2.1.2': resolution: {integrity: sha512-/mFcRSUW7Pl19KeaBIujJvZYNJQu0wD5D3aa5h+Qcph26v7nmLYlX7eajIHGi8tt2qTZX1lXifw2KLIXKwYaRQ==} + '@rspack/binding@2.1.3': + resolution: {integrity: sha512-4UGXJqUHmm36tWG1GgFZz3p8sQ5JuSgWI+gq1xPPoihS41uYJL3cXuJnirTeWsmVrusmYZTQhgU3tl3VYGcJYg==} + '@rspack/core@2.1.2': resolution: {integrity: sha512-crpNQKhHfnzrIl4Sa4fjH30Ho5aAPgyqpmJZ41SkUFOzyKHdZKYfE5LF3CMh7MiFQFPPxiiKf5BcpxmtZZx4MQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -560,15 +636,53 @@ packages: '@swc/helpers': optional: true + '@rspack/core@2.1.3': + resolution: {integrity: sha512-1iGnxLrP+iyY0ZSjLZeQTaxrISpQz4yLyqJPmaF/l4uw27/dBcrloszAeLOJQ9jiv7EJtU0T5zB+LOFPpivIxA==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 + '@swc/helpers': ^0.5.23 + peerDependenciesMeta: + '@module-federation/runtime-tools': + optional: true + '@swc/helpers': + optional: true + '@rspack/lite-tapable@1.1.2': resolution: {integrity: sha512-1OnyWChLGE46YzWyjlmYJssOu/Y0STAnnr2ueKPqDCYTf63GJMs0mxNnCul4dNiVqHYPKv3/fxrTY3IpqoVwZQ==} + '@rstest/core@0.11.1': + resolution: {integrity: sha512-9iJnDrM/zYuHyk1//CMr/Jer2XughgN3fYagGb1YWpMLUke+E+WXlUPgACwf7OkmIB47/TttbLFK+4zwGDNOFg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + happy-dom: ^20.8.3 + jsdom: '*' + peerDependenciesMeta: + happy-dom: + optional: true + jsdom: + optional: true + + '@rstest/playwright@0.11.1': + resolution: {integrity: sha512-VhA5SvfYTdC9nJ572Q5NfR8OqcHWr9Agd9zWrkSCBC3sQDwuWLiZTTX4wAv8hMwRtDGzNG0otUPTDrCQ1r0hWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rstest/core': workspace:^ + playwright: ^1.49.1 + '@swc/helpers@0.5.23': resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==} '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/node@24.13.2': resolution: {integrity: sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==} @@ -712,6 +826,10 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1598,10 +1716,6 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@playwright/test@1.61.1': - dependencies: - playwright: 1.61.1 - '@rsbuild/core@2.1.2': dependencies: '@rspack/core': 2.1.2(@swc/helpers@0.5.23) @@ -1609,11 +1723,18 @@ snapshots: transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/plugin-less@1.6.4(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))': + '@rsbuild/core@2.1.5': + dependencies: + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) + '@swc/helpers': 0.5.23 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + + '@rsbuild/plugin-less@1.6.4(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))': dependencies: deepmerge: 4.3.1 less: 4.6.4 - less-loader: 12.3.3(@rspack/core@2.1.2(@swc/helpers@0.5.23))(less@4.6.4) + less-loader: 12.3.3(@rspack/core@2.1.3(@swc/helpers@0.5.23))(less@4.6.4) reduce-configs: 1.1.2 optionalDependencies: '@rsbuild/core': 2.1.2 @@ -1631,11 +1752,11 @@ snapshots: optionalDependencies: '@rsbuild/core': 2.1.2 - '@rsbuild/plugin-stylus@2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))': + '@rsbuild/plugin-stylus@2.0.1(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))': dependencies: deepmerge: 4.3.1 stylus: 0.64.0 - stylus-loader: 8.1.3(@rspack/core@2.1.2(@swc/helpers@0.5.23))(stylus@0.64.0) + stylus-loader: 8.1.3(@rspack/core@2.1.3(@swc/helpers@0.5.23))(stylus@0.64.0) optionalDependencies: '@rsbuild/core': 2.1.2 transitivePeerDependencies: @@ -1643,12 +1764,12 @@ snapshots: - supports-color - webpack - '@rsbuild/plugin-type-check@1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2)': + '@rsbuild/plugin-type-check@1.5.0(@rsbuild/core@2.1.2)(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2)': dependencies: deepmerge: 4.3.1 json5: 2.2.3 reduce-configs: 1.1.2 - ts-checker-rspack-plugin: 1.5.1(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) + ts-checker-rspack-plugin: 1.5.1(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2) optionalDependencies: '@rsbuild/core': 2.1.2 transitivePeerDependencies: @@ -1707,27 +1828,51 @@ snapshots: '@rspack/binding-darwin-arm64@2.1.2': optional: true + '@rspack/binding-darwin-arm64@2.1.3': + optional: true + '@rspack/binding-darwin-x64@2.1.2': optional: true + '@rspack/binding-darwin-x64@2.1.3': + optional: true + '@rspack/binding-linux-arm64-gnu@2.1.2': optional: true + '@rspack/binding-linux-arm64-gnu@2.1.3': + optional: true + '@rspack/binding-linux-arm64-musl@2.1.2': optional: true + '@rspack/binding-linux-arm64-musl@2.1.3': + optional: true + '@rspack/binding-linux-riscv64-gnu@2.1.2': optional: true + '@rspack/binding-linux-riscv64-gnu@2.1.3': + optional: true + '@rspack/binding-linux-riscv64-musl@2.1.2': optional: true + '@rspack/binding-linux-riscv64-musl@2.1.3': + optional: true + '@rspack/binding-linux-x64-gnu@2.1.2': optional: true + '@rspack/binding-linux-x64-gnu@2.1.3': + optional: true + '@rspack/binding-linux-x64-musl@2.1.2': optional: true + '@rspack/binding-linux-x64-musl@2.1.3': + optional: true + '@rspack/binding-wasm32-wasi@2.1.2': dependencies: '@emnapi/core': 1.11.1 @@ -1735,15 +1880,31 @@ snapshots: '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true + '@rspack/binding-wasm32-wasi@2.1.3': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + '@rspack/binding-win32-arm64-msvc@2.1.2': optional: true + '@rspack/binding-win32-arm64-msvc@2.1.3': + optional: true + '@rspack/binding-win32-ia32-msvc@2.1.2': optional: true + '@rspack/binding-win32-ia32-msvc@2.1.3': + optional: true + '@rspack/binding-win32-x64-msvc@2.1.2': optional: true + '@rspack/binding-win32-x64-msvc@2.1.3': + optional: true + '@rspack/binding@2.1.2': optionalDependencies: '@rspack/binding-darwin-arm64': 2.1.2 @@ -1759,14 +1920,48 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.1.2 '@rspack/binding-win32-x64-msvc': 2.1.2 + '@rspack/binding@2.1.3': + optionalDependencies: + '@rspack/binding-darwin-arm64': 2.1.3 + '@rspack/binding-darwin-x64': 2.1.3 + '@rspack/binding-linux-arm64-gnu': 2.1.3 + '@rspack/binding-linux-arm64-musl': 2.1.3 + '@rspack/binding-linux-riscv64-gnu': 2.1.3 + '@rspack/binding-linux-riscv64-musl': 2.1.3 + '@rspack/binding-linux-x64-gnu': 2.1.3 + '@rspack/binding-linux-x64-musl': 2.1.3 + '@rspack/binding-wasm32-wasi': 2.1.3 + '@rspack/binding-win32-arm64-msvc': 2.1.3 + '@rspack/binding-win32-ia32-msvc': 2.1.3 + '@rspack/binding-win32-x64-msvc': 2.1.3 + '@rspack/core@2.1.2(@swc/helpers@0.5.23)': dependencies: '@rspack/binding': 2.1.2 optionalDependencies: '@swc/helpers': 0.5.23 + '@rspack/core@2.1.3(@swc/helpers@0.5.23)': + dependencies: + '@rspack/binding': 2.1.3 + optionalDependencies: + '@swc/helpers': 0.5.23 + '@rspack/lite-tapable@1.1.2': {} + '@rstest/core@0.11.1': + dependencies: + '@rsbuild/core': 2.1.5 + '@types/chai': 5.2.3 + transitivePeerDependencies: + - '@module-federation/runtime-tools' + - core-js + + '@rstest/playwright@0.11.1(@rstest/core@0.11.1)(playwright@1.61.1)': + dependencies: + '@rstest/core': 0.11.1 + playwright: 1.61.1 + '@swc/helpers@0.5.23': dependencies: tslib: 2.8.1 @@ -1776,6 +1971,13 @@ snapshots: tslib: 2.8.1 optional: true + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/node@24.13.2': dependencies: undici-types: 7.18.2 @@ -1855,6 +2057,8 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + assertion-error@2.0.1: {} + balanced-match@1.0.2: {} big.js@5.2.2: {} @@ -2010,11 +2214,11 @@ snapshots: json5@2.2.3: {} - less-loader@12.3.3(@rspack/core@2.1.2(@swc/helpers@0.5.23))(less@4.6.4): + less-loader@12.3.3(@rspack/core@2.1.3(@swc/helpers@0.5.23))(less@4.6.4): dependencies: less: 4.6.4 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) less@4.6.4: dependencies: @@ -2305,13 +2509,13 @@ snapshots: dependencies: ansi-regex: 6.0.1 - stylus-loader@8.1.3(@rspack/core@2.1.2(@swc/helpers@0.5.23))(stylus@0.64.0): + stylus-loader@8.1.3(@rspack/core@2.1.3(@swc/helpers@0.5.23))(stylus@0.64.0): dependencies: fast-glob: 3.3.2 normalize-path: 3.0.0 stylus: 0.64.0 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) stylus@0.64.0: dependencies: @@ -2345,7 +2549,7 @@ snapshots: dependencies: tslib: 2.8.1 - ts-checker-rspack-plugin@1.5.1(@rspack/core@2.1.2(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2): + ts-checker-rspack-plugin@1.5.1(@rspack/core@2.1.3(@swc/helpers@0.5.23))(tslib@2.8.1)(typescript@7.0.2): dependencies: '@rspack/lite-tapable': 1.1.2 chokidar: 3.6.0 @@ -2353,7 +2557,7 @@ snapshots: picocolors: 1.1.1 typescript: 7.0.2 optionalDependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) transitivePeerDependencies: - tslib diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7c22446..2f9f00e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -5,3 +5,4 @@ allowBuilds: minimumReleaseAgeExclude: - typescript - '@typescript/*' + - '@rstest/*' diff --git a/rstest.config.ts b/rstest.config.ts new file mode 100644 index 0000000..b68293b --- /dev/null +++ b/rstest.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from '@rstest/core'; + +export default defineConfig({ + env: { + // Let Rsbuild choose the mode based on the command. + NODE_ENV: undefined, + }, + isolate: false, +}); diff --git a/test/basic/index.test.ts b/test/basic/index.test.ts index 3719e91..b5429dd 100644 --- a/test/basic/index.test.ts +++ b/test/basic/index.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { createRsbuild } from '@rsbuild/core'; import { pluginLess } from '@rsbuild/plugin-less'; import { pluginSass } from '@rsbuild/plugin-sass'; diff --git a/test/helper.test.ts b/test/helper.test.ts index 6bbcb00..4e09d09 100644 --- a/test/helper.test.ts +++ b/test/helper.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { type CssLoaderModules, isCSSModules } from '../src/loader'; test('check isCSSModules', () => { diff --git a/test/loader.test.ts b/test/loader.test.ts index 02eeb57..b30d22b 100644 --- a/test/loader.test.ts +++ b/test/loader.test.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { wrapQuotes } from '../src/loader'; test('should wrap key correctly', () => { diff --git a/test/loose-typing/index.test.ts b/test/loose-typing/index.test.ts index be17077..15d9a9d 100644 --- a/test/loose-typing/index.test.ts +++ b/test/loose-typing/index.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { createRsbuild } from '@rsbuild/core'; import { pluginSass } from '@rsbuild/plugin-sass'; import { pluginTypedCSSModules } from '../../dist'; diff --git a/test/multiple-rules/index.test.ts b/test/multiple-rules/index.test.ts index afda05c..3027c43 100644 --- a/test/multiple-rules/index.test.ts +++ b/test/multiple-rules/index.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { createRsbuild } from '@rsbuild/core'; import { pluginLess } from '@rsbuild/plugin-less'; import { pluginSass } from '@rsbuild/plugin-sass'; diff --git a/test/named-export/index.test.ts b/test/named-export/index.test.ts index 1d9a1b1..9e2c2bd 100644 --- a/test/named-export/index.test.ts +++ b/test/named-export/index.test.ts @@ -1,7 +1,7 @@ import fs from 'node:fs'; import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { createRsbuild } from '@rsbuild/core'; import { pluginLess } from '@rsbuild/plugin-less'; import { pluginSass } from '@rsbuild/plugin-sass';