chore(deps): update vitest monorepo to v2 (major) (#2177)

* chore(deps): update vitest monorepo to v2

* Fix lockfile

* Add playwright

* Update snapshots

* Fix vitest

* Fix vitest

* Fix wasi test

* Fix worker test condition

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan <lynweklm@gmail.com>
This commit is contained in:
renovate[bot] 2024-07-11 14:58:46 +08:00 committed by GitHub
parent 9800ea7350
commit 4d39940fa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 496 additions and 238 deletions

View File

@ -587,7 +587,7 @@ jobs:
run: cargo check -p ${{ matrix.settings.package }} -F ${{ matrix.settings.features }}
test-node-wasi:
runs-on: macos-latest
runs-on: ubuntu-latest
name: Test node wasi target
timeout-minutes: 10
steps:
@ -615,7 +615,7 @@ jobs:
- name: Build
run: |
yarn build
yarn workspace @examples/napi build --target wasm32-wasip1-threads --release
yarn workspace @examples/napi build --target wasm32-wasip1-threads --profile wasi
- name: Test
run: yarn workspace @examples/napi test -s
env:
@ -623,7 +623,9 @@ jobs:
NODE_OPTIONS: '--max-old-space-size=8192'
SKIP_UNWIND_TEST: 1
- name: Browser test
run: yarn workspace @examples/napi vitest
run: |
yarn workspace @examples/napi playwright install chromium
yarn workspace @examples/napi vitest
test-latest-bun:
runs-on: ubuntu-latest

View File

@ -20,6 +20,7 @@ Generated by [AVA](https://avajs.dev).
'cross-env',
'electron',
'lodash',
'playwright',
'rxjs',
'sinon',
'vite',

View File

@ -13,14 +13,14 @@ const t =
process.arch === 'arm64' && process.platform === 'linux' ? test.skip : test
const concurrency =
process.platform === 'win32' ||
process.platform === 'darwin' ||
(process.platform === 'linux' &&
process.arch === 'x64' &&
// @ts-expect-error
process?.report?.getReport()?.header?.glibcVersionRuntime &&
!process.env.ASAN_OPTIONS &&
!process.env.WASI_TEST)
(process.platform === 'win32' ||
process.platform === 'darwin' ||
(process.platform === 'linux' &&
process.arch === 'x64' &&
// @ts-expect-error
process?.report?.getReport()?.header?.glibcVersionRuntime)) &&
!process.env.WASI_TEST &&
!process.env.ASAN_OPTIONS
? 20
: 1

View File

@ -29,18 +29,19 @@
"@napi-rs/triples": "workspace:*",
"@napi-rs/wasm-runtime": "workspace:*",
"@types/lodash": "^4.14.202",
"@vitest/browser": "^1.2.2",
"@vitest/ui": "^1.2.2",
"@vitest/browser": "^2.0.0",
"@vitest/ui": "^2.0.0",
"ava": "^6.1.1",
"buffer": "^6.0.3",
"cross-env": "7.0.3",
"electron": "^31.0.0",
"lodash": "^4.17.21",
"playwright": "^1.45.1",
"rxjs": "^7.8.1",
"sinon": "^18.0.0",
"vite": "^5.0.12",
"vite-plugin-node-polyfills": "^0.22.0",
"vitest": "^1.2.2",
"vitest": "^2.0.0",
"webdriverio": "^8.29.3"
},
"ava": {

View File

@ -27,8 +27,9 @@ export default defineConfig({
test: {
include: ['browser/**/*.{spec,test}.{js,jsx,ts,tsx}'],
browser: {
provider: 'playwright',
enabled: true,
name: 'chrome',
name: 'chromium',
},
},
})

699
yarn.lock

File diff suppressed because it is too large Load Diff