diff --git a/package.json b/package.json index e4dd7c9..8df3f3e 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,9 @@ "lint": "rslint && prettier -c .", "lint:write": "rslint --fix && prettier -w .", "prepare": "simple-git-hooks", - "test": "pnpm run /^test:/", - "test:e2e": "playwright test", - "test:unit": "rstest", + "test": "rstest", + "test:e2e": "rstest --project=e2e", + "test:unit": "rstest --project=unit", "bump": "npx bumpp" }, "simple-git-hooks": { @@ -61,11 +61,11 @@ "vm-browserify": "^1.1.2" }, "devDependencies": { - "@playwright/test": "^1.61.1", "@rsbuild/core": "^2.1.2", "@rslib/core": "^0.23.1", "@rslint/core": "^0.6.4", - "@rstest/core": "0.10.6", + "@rstest/core": "^0.11.1", + "@rstest/playwright": "^0.11.1", "@types/node": "^24.13.2", "playwright": "^1.61.1", "prettier": "^3.9.4", diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index 5861340..0000000 --- a/playwright.config.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { defineConfig } from '@playwright/test'; - -export default defineConfig({ - testMatch: '*test/e2e/**/*.test.ts', -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a6ebca..4f970da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,9 +78,6 @@ importers: specifier: ^1.1.2 version: 1.1.2 devDependencies: - '@playwright/test': - specifier: ^1.61.1 - version: 1.61.1 '@rsbuild/core': specifier: ^2.1.2 version: 2.1.2 @@ -91,8 +88,11 @@ importers: specifier: ^0.6.4 version: 0.6.4 '@rstest/core': - specifier: 0.10.6 - version: 0.10.6 + 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 @@ -176,21 +176,12 @@ packages: resolution: {integrity: sha512-Hb4o6h1Pf6yRUAX07DR4JVY7dmQw+RVQMW5/m55GoiAT/VRoKCWBtIUPPOnqDVhbx1Cjfil9b6EDrgJsUAujEQ==} engines: {node: '>= 10'} - '@emnapi/core@1.10.0': - resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} - '@emnapi/core@1.11.1': resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} - '@emnapi/runtime@1.10.0': - resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@emnapi/runtime@1.11.1': resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} - '@emnapi/wasi-threads@1.2.1': - resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@emnapi/wasi-threads@1.2.2': resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} @@ -350,25 +341,14 @@ packages: cpu: [x64] os: [win32] - '@napi-rs/wasm-runtime@1.1.4': - resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} - peerDependencies: - '@emnapi/core': ^1.7.1 - '@emnapi/runtime': ^1.7.1 - '@napi-rs/wasm-runtime@1.1.6': resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} peerDependencies: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 - '@playwright/test@1.61.1': - resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==} - engines: {node: '>=18'} - hasBin: true - - '@rsbuild/core@2.0.15': - resolution: {integrity: sha512-O8vmMhZu1YImO6jOqt/K/vlJSvkq7UtSq5YM1DIlcEd9LW8Gf6/dkQ1B2KPI6F+hSMFBnTTTumdcIowSLCw97g==} + '@rsbuild/core@2.1.2': + resolution: {integrity: sha512-EP24Oj01bdwtw/Xl3LiaLe/WG6PBQV2yWbbCh+2TkMDc9dNHiyBTnR+/JZvGxI8RdO5qU0rH4YgMOJ6nVXIQSA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -377,8 +357,8 @@ packages: core-js: optional: true - '@rsbuild/core@2.1.2': - resolution: {integrity: sha512-EP24Oj01bdwtw/Xl3LiaLe/WG6PBQV2yWbbCh+2TkMDc9dNHiyBTnR+/JZvGxI8RdO5qU0rH4YgMOJ6nVXIQSA==} + '@rsbuild/core@2.1.5': + resolution: {integrity: sha512-7TW4U1SH7VxQZzSTIOzvwj5lo9uNTmGpsmTXFr4axQAE4giLDKP3kVUA1ZW4P3/Mz4QQJJyvZP29mVcb8kZCfg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -453,19 +433,14 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding-darwin-arm64@2.0.8': - resolution: {integrity: sha512-vCgbgH7B7qom+uID+RCZsTCOYFb9wC4/4+1U6rMfytrXGVJ72eNQs2tbdjOl0lb18CT3N/n+VkWynUiLk84GwA==} - cpu: [arm64] - os: [darwin] - '@rspack/binding-darwin-arm64@2.1.2': resolution: {integrity: sha512-IYcxareUOYJZz+uNMSIwn+iDRiVyjZNOjoxO/zL4OFaPK8Ncrw0ka/9DqL9Gd7OpnAXN1zK3uS8yD0O1yIYI3Q==} cpu: [arm64] os: [darwin] - '@rspack/binding-darwin-x64@2.0.8': - resolution: {integrity: sha512-satPm2PD4B7jDTVlVAdvMVdUszwLvWUEnUDzLb77mvVkezKNDZmuhb+e8s+FfKs8hJpNbZ9VAejuA2rr8o985w==} - cpu: [x64] + '@rspack/binding-darwin-arm64@2.1.3': + resolution: {integrity: sha512-oOGI0RSL89Ehu9T22rugmfUY9OC2eBqLMeWRYsu7bhlUrjoXeVfGBBSEXCse666BQ1sAiM8hD/k7nqVria/okQ==} + cpu: [arm64] os: [darwin] '@rspack/binding-darwin-x64@2.1.2': @@ -473,11 +448,10 @@ packages: cpu: [x64] os: [darwin] - '@rspack/binding-linux-arm64-gnu@2.0.8': - resolution: {integrity: sha512-pSI+npPQE/uDtiboqvcOIRJbEV2+B+H1xffmko/gw50la92oTUW60kVULFwsb6L0+GVCzIcwX3yq60GtYIn+Ug==} - cpu: [arm64] - os: [linux] - libc: [glibc] + '@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==} @@ -485,11 +459,11 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-arm64-musl@2.0.8': - resolution: {integrity: sha512-igjJ43yxWQ72GZqjDDZSSHax9/Vg+6rLMmOvFglTJUkQpB4Tyvu/YjW+WRjYj2xRw6blOjLxUSJWASvuSqqlvg==} + '@rspack/binding-linux-arm64-gnu@2.1.3': + resolution: {integrity: sha512-aCy9Zli/2Qf+Ee5otXfFQ6mhv5fEyn0wIoBVmouqtJoqOO21et6UTtJ+LHLsMDolwGLyHERAljeSFSmYX3/O5A==} cpu: [arm64] os: [linux] - libc: [musl] + libc: [glibc] '@rspack/binding-linux-arm64-musl@2.1.2': resolution: {integrity: sha512-yt+GGWUH7WPE8K97cRc8OpZhH7Pbj1vU+lkvKbDtF/rR8X9a/bJsA/nBqyUV2oBKOVbrp5I8rFZlnDskMqgvKw==} @@ -497,23 +471,35 @@ packages: 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-x64-gnu@2.0.8': - resolution: {integrity: sha512-zrkoEOnqj1hOEBO5T2I/2Ts2HSJsYFh1qXwMpK4dMJFGGNWDfNeUa6/LF5uq3VINF3JUl7RL47AgrucoSZJXPA==} - cpu: [x64] + '@rspack/binding-linux-riscv64-musl@2.1.3': + resolution: {integrity: sha512-6PvbXb3FOK4X3S5QGvoSW/sqExmsvAoPnQ/YSFrXvTphkXFezA7wnobmGBHT8JQP31hcFRzJHIZSIOKktzSzzg==} + cpu: [riscv64] os: [linux] - libc: [glibc] + libc: [musl] '@rspack/binding-linux-x64-gnu@2.1.2': resolution: {integrity: sha512-KDoPy0Msf/JLhxgPPrJQzZeB4Qpqd32em8AP5lSW2s6jR5I35dHgAe9xc2A++EQtnSrU4GTn6DBvFC7q84SihQ==} @@ -521,11 +507,11 @@ packages: os: [linux] libc: [glibc] - '@rspack/binding-linux-x64-musl@2.0.8': - resolution: {integrity: sha512-6CtDaGZjNDvJd9TBp7a9zABbrPORO21W96+3ZcGBn0YNUPUk4ARxIxrTTpeJ/1F41QDM8AYIkGDdqEYMqTYBsA==} + '@rspack/binding-linux-x64-gnu@2.1.3': + resolution: {integrity: sha512-lMXjoGKf0SnviH596fmTszgtnXLHmWOoE90G8grG9MvKVa3pelRmfps5ewZL9s8ENf3NXRfOxIhIf/M9as6MqA==} cpu: [x64] os: [linux] - libc: [musl] + libc: [glibc] '@rspack/binding-linux-x64-musl@2.1.2': resolution: {integrity: sha512-66hWmIGvn4zCKAYXJE9Bp5SNSLYnLFq2Ke/efE+ZtWy43Dd5vk9AAOmThVGBwdwmIxmGtHGCp+cAuS4G0wu0TA==} @@ -533,27 +519,28 @@ packages: os: [linux] libc: [musl] - '@rspack/binding-wasm32-wasi@2.0.8': - resolution: {integrity: sha512-Yf4SiqTUroT5Ju+te0YAY2xxKOb35tECsO21v7hYyGa705wrgoAK/MmF7enOvs9GR1iZIqgiLD/wxsIxl8GjJw==} - cpu: [wasm32] + '@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-win32-arm64-msvc@2.0.8': - resolution: {integrity: sha512-8NCuiQsAhXrwRBy57QZoypqrws/zLBkaQVGiB8hksr6v++8hNigNjqpQARLbd0iyMuHsQQ++8+auGk6xlDXmzw==} - cpu: [arm64] - os: [win32] + '@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-ia32-msvc@2.0.8': - resolution: {integrity: sha512-bxiekytbX7V9KFAra+HkwtNWC6pYfHEBBZFpiT0xUs3mCFOmAAFVBsBSQsoCP9AdCEXoMAvNdnrHNw3iov4OZw==} - cpu: [ia32] + '@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': @@ -561,9 +548,9 @@ packages: cpu: [ia32] os: [win32] - '@rspack/binding-win32-x64-msvc@2.0.8': - resolution: {integrity: sha512-7zPs8YCe/ZVJTwd+5lpB0CP0tkn2pONf/T1ycmVY76u21Nrwt8mXQGc/2yH2eWP4B7fikYBr3hGr7mpR2fajqQ==} - cpu: [x64] + '@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': @@ -571,14 +558,19 @@ packages: cpu: [x64] os: [win32] - '@rspack/binding@2.0.8': - resolution: {integrity: sha512-3uZ+y8aQxq33ty2srMxg2Nu0XuBI6vVrG50rkDaXqwWqOohfgGUSfFuQK7EnSUNy4aFUQlCG6NHialQHJov0wg==} + '@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/core@2.0.8': - resolution: {integrity: sha512-+NLGJf8gZxihDmMFzjlly3toc2SMjeDmuvz0/Cai9AMdV4F+Pqcnt2BA9V4e3SY2jmhJQtPwgyyLtR1RiJO77g==} + '@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} peerDependencies: '@module-federation/runtime-tools': ^0.24.1 || ^2.0.0 @@ -589,8 +581,8 @@ packages: '@swc/helpers': optional: true - '@rspack/core@2.1.2': - resolution: {integrity: sha512-crpNQKhHfnzrIl4Sa4fjH30Ho5aAPgyqpmJZ41SkUFOzyKHdZKYfE5LF3CMh7MiFQFPPxiiKf5BcpxmtZZx4MQ==} + '@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 @@ -601,8 +593,8 @@ packages: '@swc/helpers': optional: true - '@rstest/core@0.10.6': - resolution: {integrity: sha512-nX61dw2Tnxfwy/jGZEuNbh2tzapgaH6Iwj4Aw5d2wxUwxptUL3ddUxFF5M1ZSWoLEVG30VaPg3ITzrSo5sdbTg==} + '@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: @@ -614,12 +606,16 @@ packages: 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.1': - resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} - '@tybys/wasm-util@0.10.3': resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} @@ -1227,33 +1223,17 @@ snapshots: '@ast-grep/napi-win32-ia32-msvc': 0.37.0 '@ast-grep/napi-win32-x64-msvc': 0.37.0 - '@emnapi/core@1.10.0': - dependencies: - '@emnapi/wasi-threads': 1.2.1 - tslib: 2.8.1 - optional: true - '@emnapi/core@1.11.1': dependencies: '@emnapi/wasi-threads': 1.2.2 tslib: 2.8.1 optional: true - '@emnapi/runtime@1.10.0': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/runtime@1.11.1': dependencies: tslib: 2.8.1 optional: true - '@emnapi/wasi-threads@1.2.1': - dependencies: - tslib: 2.8.1 - optional: true - '@emnapi/wasi-threads@1.2.2': dependencies: tslib: 2.8.1 @@ -1337,13 +1317,6 @@ snapshots: '@esbuild/win32-x64@0.28.0': optional: true - '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@tybys/wasm-util': 0.10.1 - optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': dependencies: '@emnapi/core': 1.11.1 @@ -1351,20 +1324,16 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@playwright/test@1.61.1': - dependencies: - playwright: 1.61.1 - - '@rsbuild/core@2.0.15': + '@rsbuild/core@2.1.2': dependencies: - '@rspack/core': 2.0.8(@swc/helpers@0.5.23) + '@rspack/core': 2.1.2(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' - '@rsbuild/core@2.1.2': + '@rsbuild/core@2.1.5': dependencies: - '@rspack/core': 2.1.2(@swc/helpers@0.5.23) + '@rspack/core': 2.1.3(@swc/helpers@0.5.23) '@swc/helpers': 0.5.23 transitivePeerDependencies: - '@module-federation/runtime-tools' @@ -1417,53 +1386,52 @@ snapshots: '@rslint/native-win32-x64-msvc@0.6.4': optional: true - '@rspack/binding-darwin-arm64@2.0.8': - optional: true - '@rspack/binding-darwin-arm64@2.1.2': optional: true - '@rspack/binding-darwin-x64@2.0.8': + '@rspack/binding-darwin-arm64@2.1.3': optional: true '@rspack/binding-darwin-x64@2.1.2': optional: true - '@rspack/binding-linux-arm64-gnu@2.0.8': + '@rspack/binding-darwin-x64@2.1.3': optional: true '@rspack/binding-linux-arm64-gnu@2.1.2': optional: true - '@rspack/binding-linux-arm64-musl@2.0.8': + '@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-x64-gnu@2.0.8': + '@rspack/binding-linux-riscv64-musl@2.1.3': optional: true '@rspack/binding-linux-x64-gnu@2.1.2': optional: true - '@rspack/binding-linux-x64-musl@2.0.8': + '@rspack/binding-linux-x64-gnu@2.1.3': optional: true '@rspack/binding-linux-x64-musl@2.1.2': optional: true - '@rspack/binding-wasm32-wasi@2.0.8': - dependencies: - '@emnapi/core': 1.10.0 - '@emnapi/runtime': 1.10.0 - '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) + '@rspack/binding-linux-x64-musl@2.1.3': optional: true '@rspack/binding-wasm32-wasi@2.1.2': @@ -1473,36 +1441,30 @@ snapshots: '@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.0.8': + '@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-ia32-msvc@2.0.8': + '@rspack/binding-win32-arm64-msvc@2.1.3': optional: true '@rspack/binding-win32-ia32-msvc@2.1.2': optional: true - '@rspack/binding-win32-x64-msvc@2.0.8': + '@rspack/binding-win32-ia32-msvc@2.1.3': optional: true '@rspack/binding-win32-x64-msvc@2.1.2': optional: true - '@rspack/binding@2.0.8': - optionalDependencies: - '@rspack/binding-darwin-arm64': 2.0.8 - '@rspack/binding-darwin-x64': 2.0.8 - '@rspack/binding-linux-arm64-gnu': 2.0.8 - '@rspack/binding-linux-arm64-musl': 2.0.8 - '@rspack/binding-linux-x64-gnu': 2.0.8 - '@rspack/binding-linux-x64-musl': 2.0.8 - '@rspack/binding-wasm32-wasi': 2.0.8 - '@rspack/binding-win32-arm64-msvc': 2.0.8 - '@rspack/binding-win32-ia32-msvc': 2.0.8 - '@rspack/binding-win32-x64-msvc': 2.0.8 + '@rspack/binding-win32-x64-msvc@2.1.3': + optional: true '@rspack/binding@2.1.2': optionalDependencies: @@ -1519,11 +1481,20 @@ snapshots: '@rspack/binding-win32-ia32-msvc': 2.1.2 '@rspack/binding-win32-x64-msvc': 2.1.2 - '@rspack/core@2.0.8(@swc/helpers@0.5.23)': - dependencies: - '@rspack/binding': 2.0.8 + '@rspack/binding@2.1.3': optionalDependencies: - '@swc/helpers': 0.5.23 + '@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: @@ -1531,22 +1502,28 @@ snapshots: optionalDependencies: '@swc/helpers': 0.5.23 - '@rstest/core@0.10.6': + '@rspack/core@2.1.3(@swc/helpers@0.5.23)': dependencies: - '@rsbuild/core': 2.0.15 + '@rspack/binding': 2.1.3 + optionalDependencies: + '@swc/helpers': 0.5.23 + + '@rstest/core@0.11.1': + dependencies: + '@rsbuild/core': 2.1.5 '@types/chai': 5.2.3 transitivePeerDependencies: - '@module-federation/runtime-tools' - core-js - '@swc/helpers@0.5.23': + '@rstest/playwright@0.11.1(@rstest/core@0.11.1)(playwright@1.61.1)': dependencies: - tslib: 2.8.1 + '@rstest/core': 0.11.1 + playwright: 1.61.1 - '@tybys/wasm-util@0.10.1': + '@swc/helpers@0.5.23': dependencies: tslib: 2.8.1 - optional: true '@tybys/wasm-util@0.10.3': dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 3273dd1..5a185f5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -6,3 +6,4 @@ allowBuilds: minimumReleaseAgeExclude: - typescript - '@typescript/*' + - '@rstest/*' diff --git a/rstest.config.ts b/rstest.config.ts index e49db19..40c2ce9 100644 --- a/rstest.config.ts +++ b/rstest.config.ts @@ -1,5 +1,18 @@ import { defineConfig } from '@rstest/core'; export default defineConfig({ - include: ['test/unit/**/*.test.ts'], + projects: [ + { + name: 'unit', + include: ['test/unit/**/*.test.ts'], + }, + { + name: 'e2e', + env: { + // Let Rsbuild choose the mode based on the command. + NODE_ENV: undefined, + }, + include: ['test/e2e/**/*.test.ts'], + }, + ], }); diff --git a/test/e2e/basic/index.test.ts b/test/e2e/basic/index.test.ts index adb7566..c6bab21 100644 --- a/test/e2e/basic/index.test.ts +++ b/test/e2e/basic/index.test.ts @@ -1,6 +1,6 @@ import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { loadConfig } from '@rsbuild/core'; import { createRsbuild } from '@rsbuild/core'; diff --git a/test/e2e/buffer-options/index.test.ts b/test/e2e/buffer-options/index.test.ts index f7a8733..5ecf4c4 100644 --- a/test/e2e/buffer-options/index.test.ts +++ b/test/e2e/buffer-options/index.test.ts @@ -1,6 +1,6 @@ import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { loadConfig } from '@rsbuild/core'; import { createRsbuild } from '@rsbuild/core'; diff --git a/test/e2e/buffer/index.test.ts b/test/e2e/buffer/index.test.ts index 31b342e..ff87abe 100644 --- a/test/e2e/buffer/index.test.ts +++ b/test/e2e/buffer/index.test.ts @@ -1,6 +1,6 @@ import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { loadConfig } from '@rsbuild/core'; import { createRsbuild } from '@rsbuild/core'; diff --git a/test/e2e/v8/index.test.ts b/test/e2e/v8/index.test.ts index 2afae7e..785a60e 100644 --- a/test/e2e/v8/index.test.ts +++ b/test/e2e/v8/index.test.ts @@ -1,6 +1,6 @@ import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { expect, test } from '@playwright/test'; +import { expect, test } from '@rstest/playwright'; import { loadConfig } from '@rsbuild/core'; import { createRsbuild } from '@rsbuild/core';