Skip to content

Commit

Permalink
feat: switch tests to using upload-api (#118)
Browse files Browse the repository at this point in the history
Switches tests to use upload-api with in-memory stores instead of
mocking.
  • Loading branch information
Gozala authored Nov 4, 2023
1 parent 5707e54 commit be19ff9
Show file tree
Hide file tree
Showing 10 changed files with 670 additions and 522 deletions.
1 change: 1 addition & 0 deletions api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {}
1 change: 1 addition & 0 deletions api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@ucanto/interface'
373 changes: 373 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@
"lint:fix": "eslint --fix '**/*.{js,ts}'",
"check": "tsc --build",
"format": "prettier --write '**/*.{js,ts,yml,json}' --ignore-path .gitignore",
"test": "npm-run-all -p -r mock test:ava",
"test:ava": "ava --verbose --timeout=1m",
"test:watch": "ava --watch",
"mock": "run-p mock:*",
"mock:bucket-200": "PORT=9200 STATUS=200 node test/helpers/bucket-server.js"
"test": "npm-run-all -p test:ava",
"test:ava": "ava --verbose --serial --timeout=1m",
"test:watch": "ava --serial --watch"
},
"repository": {
"type": "git",
Expand All @@ -41,6 +39,9 @@
"@ucanto/interface": "^9.0.0",
"@web3-storage/capabilities": "^10.2.0",
"@web3-storage/upload-client": "^11.1.0",
"@web3-storage/upload-api": "^7.1.0",
"@web3-storage/sigv4": "^1.0.2",
"@web-std/blob": "^3.0.5",
"ava": "^5.1.0",
"execa": "^8.0.1",
"multiformats": "^12.0.1",
Expand Down Expand Up @@ -83,8 +84,7 @@
"ignorePatterns": [
"dist",
"coverage",
"src/types.js",
"test/types.js"
"api.js"
]
},
"prettier": {
Expand Down
Loading

0 comments on commit be19ff9

Please sign in to comment.