Skip to content

Commit

Permalink
test: use dam to download data
Browse files Browse the repository at this point in the history
Will download newer data if it is stale (hash check) and enables the use
of multiple data stores in the future.
  • Loading branch information
thewtex committed Oct 30, 2023
1 parent d79ddd2 commit 04abd0d
Show file tree
Hide file tree
Showing 5 changed files with 426 additions and 60 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ dist-ssr


test/data/
test/data.tar.gz
cypress/screenshots
cypress/videos

types/

.npmrc
.pnpm-store
.pnpm-store
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
"build": "pnpm -r build",
"lint": "pnpm prettier --check . && pnpm eslint .",
"lint:fix": "pnpm prettier --write . && pnpm eslint --fix .",
"test": "pnpm test:downloadData && pnpm cy:component",
"test:ci": "pnpm test:downloadData && pnpm cy:component:ci",
"test:downloadData": "node test/downloadData.mjs",
"test": "pnpm test:data:download && pnpm cy:component",
"test:ci": "pnpm test:data:download && pnpm cy:component:ci",
"test:data:pack": "dam pack test/data test/data.tar.gz",
"test:data:download": "dam download -v test/data test/data.tar.gz bafybeidbosxn5wpejig6n5z35jf7ypgxqnib3myp26fqthgu6opchqxruq https://github.com/Kitware/itk-vtk-viewer/releases/download/v14.35.1/itk-vtk-viewer-testing-data.tar.gz",
"cy:watch": "cypress open --component -b chrome",
"cy:component": "cypress run --component",
"cy:component:ci": "cypress run --component --record",
Expand All @@ -23,6 +24,7 @@
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@cypress/mount-utils": "^4.0.0",
"@itk-wasm/dam": "^1.0.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"cypress": "^13.0.0",
Expand Down
Loading

0 comments on commit 04abd0d

Please sign in to comment.