Skip to content

Commit

Permalink
remove xs:unit testing (#10207)
Browse files Browse the repository at this point in the history
incidental

## Description
While working on #10202 I got a CI error that "no function" for the Zoe tests. It turned out to be that ava-xs doesn't support `t.snapshot`. So I added it to the voluminous "exclude" value and pushed again. Later I see CI [fails again](https://github.com/Agoric/agoric-sdk/actions/runs/11162498228/job/31027478876?pr=10202) because ava-xs is confused by the `snapshots` directory.

The `test:xs-unit` job is not carrying its weight. I can't recall it ever detecting an error that wasn't detected in Node. Maybe a while ago it did and it was an important line of defense. In the past year we've developed much more integration testing and I'm confident these tests are redundant. 

It generally doesn't hurt to test more, but ava-xs is so different from XS that the cost of reconciliation is too great.

### Security Considerations
none
### Scaling Considerations
none

### Documentation Considerations
none

### Testing Considerations
see above

### Upgrade Considerations
none
  • Loading branch information
mergify[bot] authored Oct 4, 2024
2 parents 70bc20f + 96f737e commit fdbffa0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ jobs:
- name: set vars
id: vars
# END-TEST-BOILERPLATE
# XXX test:xs-unit is deprecated branch protection still expects it
run: |
echo "node-version=${{ matrix.engine == 'xs' && '18.x' || matrix.engine }}" >> $GITHUB_OUTPUT
echo "test=${{ matrix.engine == 'xs' && 'test:xs-unit' || 'test:unit' }}" >> $GITHUB_OUTPUT
Expand Down
13 changes: 2 additions & 11 deletions packages/ERTP/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
"test": "ava",
"test:c8": "c8 $C8_OPTIONS ava",
"test:xs": "yarn test:xs-unit && yarn test:xs-worker",
"test:xs-unit": "ava-xs",
"test:xs": "yarn test:xs-worker",
"test:xs-unit": "exit 0",
"test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 test/swingsetTests",
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
Expand Down Expand Up @@ -64,15 +64,6 @@
"exported.js",
"exported.d.ts"
],
"ava-xs": {
"exclude": [
"swingsetTests",
"# fast-check unsupported",
"test/unitTests/amountProperties.test.js",
"test/unitTests/inputValidation.test.js",
"test/unitTests/issuerObj.test.js"
]
},
"ava": {
"files": [
"test/**/*.test.*"
Expand Down
50 changes: 2 additions & 48 deletions packages/zoe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
"test:unit": "ava 'test/unitTests' -T 1m --verbose",
"test:swingset": "ava 'test/swingsetTests' -T 10m --verbose",
"test:xs": "yarn test:xs-unit",
"test:xs-unit": "ava-xs --verbose",
"test:xs": "yarn test:xs-worker",
"test:xs-unit": "exit 0",
"test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 'test/swingsetTests'",
"build-zcfBundle": "yarn build:bundles",
"lint-fix": "yarn lint:eslint --fix",
Expand Down Expand Up @@ -85,52 +85,6 @@
"exported.js",
"NEWS.md"
],
"ava-xs": {
"exclude": [
"# path/url/import.meta stuff",
"unitTests/contracts/",
"test/swingsetTests/privateArgs/privateArgs.test.js",
"test/swingsetTests/brokenContracts/crashingContract.test.js",
"test/swingsetTests/offerArgs/offerArgs.test.js",
"test/swingsetTests/makeKind/makeKind.test.js",
"test/swingsetTests/zoe/zoe.test.js",
"test/swingsetTests/runMint/runMint.test.js",
"test/unitTests/zoe.test.js",
"test/unitTests/scriptedOracle.test.js",
"test/unitTests/makeKind.test.js",
"test/unitTests/instanceStorage.test.js",
"test/unitTests/contractSupport/depositTo.test.js",
"test/unitTests/contractSupport/withdrawFrom.test.js",
"test/unitTests/contractSupport/offerTo.test.js",
"test/unitTests/zcf/zcfSeat.test.js",
"test/unitTests/zcf/zcfSeat-exit.test.js",
"test/unitTests/zcf/setupZcfTest.js",
"test/unitTests/zcf/feeMintAccess.test.js",
"# import.meta.url by way of setupZcfTest",
"test/unitTests/zoe.test.js",
"test/unitTests/zoe-startInstance.test.js",
"test/unitTests/blockedOffers.test.js",
"test/unitTests/zcf/reallocate-empty.test.js",
"test/unitTests/zcf/zoeHelpersWZcf.test.js",
"test/unitTests/zcf/reallocateForZCFMint.test.js",
"test/unitTests/zcf/atomicRearrange.test.js",
"test/unitTests/zcf/zcf.test.js",
"test/unitTests/zcf/allStagedSeatsUsed.test.js",
"# ManualTimer.setWakeup: no function",
"test/unitTests/fakePriceAuthority.test.js",
"test/unitTests/manualTimer.test.js",
"# hangs",
"makeKind.test.js",
"test/unitTests/scriptedOracle.test.js",
"test/unitTests/zoe.test.js",
"test/unitTests/zcf/allStagedSeatsUsed.test.js",
"# t.snapshot",
"test/exports.test.js",
"test/snapshots",
"# We use SWINGSET_WORKER_TYPE=xs ava to run these...",
"swingsetTests"
]
},
"ava": {
"files": [
"test/**/*.test.*"
Expand Down

0 comments on commit fdbffa0

Please sign in to comment.