-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore(test): vitest migration - exploration phase #9969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: chr/tape-to-vitest
Are you sure you want to change the base?
Changes from 9 commits
04b8519
718a052
4949e46
d632932
541f0c1
3b187e2
fd05149
8c1954a
47e1d61
14d3c7c
f14ccae
9e75ff6
c2955bb
2f77513
c8eef73
cfffba1
b0280a0
84ff56c
4a35838
f2402ce
e95ae27
d616d74
cc69f73
6161023
fd9930c
8fce5f5
4766b53
7054272
a9edc69
b1e947f
a4ffad0
facc654
354485a
a14cd26
ed053cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| --ignore-engines true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,7 @@ | |
| "@deck.gl/core": "~9.2.0", | ||
| "@luma.gl/core": "~9.2.6", | ||
| "@luma.gl/engine": "~9.2.6", | ||
| "@probe.gl/test-utils": "^4.1.0" | ||
| "vitest": "^2.1.0" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're stuck on vitest 2 until we upgrade from node 18. |
||
| }, | ||
| "gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // deck.gl | ||
| // SPDX-License-Identifier: MIT | ||
| // Copyright (c) vis.gl contributors | ||
|
|
||
| // Type declarations for browser test driver functions injected by @probe.gl/test-utils | ||
|
|
||
| interface BrowserTestDriverDiffOptions { | ||
| goldenImage: string; | ||
| region?: {x: number; y: number; width: number; height: number}; | ||
| saveOnFail?: boolean; | ||
| saveAs?: string; | ||
| threshold?: number; | ||
| createDiffImage?: boolean; | ||
| tolerance?: number; | ||
| includeAA?: boolean; | ||
| includeEmpty?: boolean; | ||
| platform?: string; | ||
| } | ||
|
|
||
| interface BrowserTestDriverDiffResult { | ||
| headless: boolean; | ||
| match: string | number; | ||
| matchPercentage: string; | ||
| success: boolean; | ||
| error: Error | string | null; | ||
| } | ||
|
|
||
| interface BrowserTestDriverInputEvent { | ||
| type: string; | ||
| [key: string]: any; | ||
| } | ||
|
|
||
| declare global { | ||
| interface Window { | ||
| browserTestDriver_emulateInput(event: BrowserTestDriverInputEvent): Promise<void>; | ||
| browserTestDriver_captureAndDiffScreen( | ||
| options: BrowserTestDriverDiffOptions | ||
| ): Promise<BrowserTestDriverDiffResult>; | ||
| } | ||
| } | ||
|
|
||
| export {}; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,12 +22,15 @@ | |
| "clean": "ocular-clean", | ||
| "build": "npm run clean && ocular-build && lerna run build", | ||
| "lint": "ocular-lint", | ||
| "cover": "ocular-test cover", | ||
| "cover": "vitest run --coverage", | ||
| "publish-beta": "ocular-publish version-only-beta", | ||
| "publish-prod": "ocular-publish version-only-prod", | ||
| "start": "open https://deck.gl/docs/get-started/getting-started", | ||
| "test": "ocular-test", | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need Please let me know if ocular-test did something internally that we lose because we're removing it |
||
| "test-fast": "ocular-lint && ocular-test node", | ||
| "test": "vitest run", | ||
| "test-node": "vitest run --project node", | ||
|
||
| "test-browser": "vitest run --project browser", | ||
| "test-headless": "vitest run --project headless", | ||
| "test-fast": "ocular-lint && vitest run --project node", | ||
| "test-website": "cd website && yarn && yarn test-build && cd ..", | ||
| "metrics": "ocular-metrics", | ||
| "link-luma": "yarn && (cd node_modules && mv luma.gl luma.orig && ln -s ../../luma.gl/modules/core)", | ||
|
|
@@ -42,18 +45,20 @@ | |
| "@loaders.gl/csv": "^4.2.0", | ||
| "@loaders.gl/polyfills": "^4.2.0", | ||
| "@luma.gl/core": "^9.2.6", | ||
| "@luma.gl/webgpu": "^9.2.6", | ||
| "@luma.gl/effects": "^9.2.6", | ||
| "@luma.gl/webgpu": "^9.2.6", | ||
| "@math.gl/proj4": "^4.1.0", | ||
| "@probe.gl/bench": "^4.1.0", | ||
| "@vis.gl/dev-tools": "1.0.0-alpha.21", | ||
| "@vis.gl/ts-plugins": "1.0.0-alpha.21", | ||
| "@vitest/browser": "^2.1.9", | ||
| "@vitest/coverage-v8": "^2.1.9", | ||
| "jsdom": "^20.0.0", | ||
| "playwright": "^1.58.0", | ||
| "pre-commit": "^1.2.2", | ||
| "puppeteer": "^24.26.1", | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hoping to remove puppeteer after all tests pass |
||
| "s2-geometry": "^1.2.10", | ||
| "tap-spec": "^5.0.0", | ||
| "tape-catch": "^1.0.6" | ||
| "vitest": "^2.1.9" | ||
| }, | ||
| "resolutions": { | ||
| "wgsl_reflect": "^1.2.0" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RFC outlines the goal being to implement a backwards-compatibility layer and deprecation warnings in
@deck.gl/test-utils. I'm not sure what users use it for, but gets a significant number of downloads still so we need to not break anything.I'm thinking we'll need to keep some old test infrastructure around for this module to ensure correctness on both tape and vitest until deck v10
Temporarily, I've removed tape and probe.gl from deck's test utils until I get all tests to pass without the extra complexity.