Skip to content
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

adopt Ava default file glob #8653

Merged
merged 48 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
070f9f2
test: inherit Ava config
turadg Dec 14, 2023
ce2f01a
ci: manual migration of test- strings
turadg Dec 22, 2023
59ca055
docs: migrate test- strings
turadg May 9, 2024
9c2a227
docs: migrate test- in snapshots
turadg May 9, 2024
c0dcad6
chore: script to migrate test filenames
turadg Dec 14, 2023
0af98fc
chore: test glob to Ava default
turadg May 9, 2024
8fe8b37
chore: test glob to Ava default
turadg May 9, 2024
2cd2b0f
chore: test glob to Ava default
turadg May 9, 2024
e6d809e
chore: test glob to Ava default
turadg May 9, 2024
67372a3
chore: test glob to Ava default
turadg May 9, 2024
3cc247c
chore: test glob to Ava default
turadg May 9, 2024
8ad4e4d
chore: test glob to Ava default
turadg May 9, 2024
d935e71
chore: test glob to Ava default
turadg May 9, 2024
c8c483a
chore: test glob to Ava default
turadg May 9, 2024
f285a1a
chore: test glob to Ava default
turadg May 9, 2024
1b589c2
chore: test glob to Ava default
turadg May 9, 2024
c06b1a0
chore: test glob to Ava default
turadg May 9, 2024
0cca82c
chore: test glob to Ava default
turadg May 9, 2024
c61e75c
chore: test glob to Ava default
turadg May 9, 2024
d65606e
chore: test glob to Ava default
turadg May 9, 2024
ecb5533
chore: test glob to Ava default
turadg May 9, 2024
d46ea40
chore: test glob to Ava default
turadg May 9, 2024
039da0e
chore: test glob to Ava default
turadg May 9, 2024
521813a
chore: test glob to Ava default
turadg May 9, 2024
a74175e
chore: test glob to Ava default
turadg May 9, 2024
7e91440
chore: test glob to Ava default
turadg May 9, 2024
e48acee
chore: test glob to Ava default
turadg May 9, 2024
ea40e20
chore: test glob to Ava default
turadg May 9, 2024
13b3d13
chore: test glob to Ava default
turadg May 9, 2024
f7b64d1
chore: test glob to Ava default
turadg May 9, 2024
7cdfccd
chore: test glob to Ava default
turadg May 9, 2024
34c9747
chore: test glob to Ava default
turadg May 9, 2024
d86ca03
chore: test glob to Ava default
turadg May 9, 2024
b29a8ab
chore: test glob to Ava default
turadg May 9, 2024
06fbbef
chore: test glob to Ava default
turadg May 9, 2024
51617e5
chore: test glob to Ava default
turadg May 9, 2024
bd78c97
chore: test glob to Ava default
turadg May 9, 2024
671f7e9
chore: test glob to Ava default
turadg May 9, 2024
dd6346e
chore: test glob to Ava default
turadg May 9, 2024
889310e
chore: test glob to Ava default
turadg May 9, 2024
9b22bef
chore: test glob to Ava default
turadg May 9, 2024
1b17c09
chore: test glob to Ava default
turadg May 9, 2024
cd74314
chore: test glob to Ava default
turadg May 9, 2024
16792f5
chore: test glob to Ava default
turadg May 9, 2024
3bd14cf
chore: test glob to Ava default
turadg May 9, 2024
4dfd4a0
chore: test glob to Ava default
turadg May 9, 2024
011dd87
chore: test glob to Ava default
turadg May 9, 2024
9b8865f
chore: test glob to Ava default
turadg May 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module.exports = {
{
// These tests use EV() instead of E(), which are easy to confuse.
// Help by erroring when E() packages are imported.
files: ['packages/boot/test/**/test-*'],
files: ['packages/boot/test/**/*.test.*'],
rules: {
'no-restricted-imports': [
'error',
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ jobs:
# END-TEST-BOILERPLATE
- name: yarn test (SwingSet)
if: (success() || failure())
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[A-Da-d]*.js' | $TEST_COLLECT
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[A-Da-d]*' | $TEST_COLLECT
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
Expand Down Expand Up @@ -540,7 +540,7 @@ jobs:
# END-TEST-BOILERPLATE
- name: yarn test (SwingSet)
if: (success() || failure())
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[E-Ie-i]*.js' | $TEST_COLLECT
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[E-Ie-i]*' | $TEST_COLLECT
- name: yarn test (xsnap-lockdown)
if: (success() || failure())
run: cd packages/xsnap-lockdown && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT
Expand Down Expand Up @@ -591,7 +591,7 @@ jobs:
# END-TEST-BOILERPLATE
- name: yarn test (SwingSet)
if: (success() || failure())
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[J-Rj-r]*.js' | $TEST_COLLECT
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[J-Rj-r]*' | $TEST_COLLECT
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
Expand Down Expand Up @@ -633,7 +633,7 @@ jobs:

- name: yarn test (SwingSet)
if: (success() || failure())
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[S-Zs-z0-9]*.js' | $TEST_COLLECT
run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[S-Zs-z0-9.test]*.js' | $TEST_COLLECT
- name: notify on failure
if: failure() && github.event_name != 'pull_request'
uses: ./.github/actions/notify-status
Expand Down
4 changes: 2 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,8 @@ yarn build

```sh
cd packages/SwingSet
yarn test test/test-xsnap-store.js --update-snapshots
git add test/snapshots/test-xsnap-store.*
yarn test test/xsnap-store.test.js --update-snapshots
git add test/snapshots/xsnap-store.*
git commit -m 'chore(swingset-vat): Update xsnap store test snapshots'
cd ../..
```
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
},
"ava": {
"files": [
"packages/*/test/**/test-*.ts"
"packages/*/test/**/test-*.*",
"packages/*/test/**/*.test.*"
],
"timeout": "30m"
},
Expand Down
11 changes: 6 additions & 5 deletions packages/ERTP/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test:c8": "c8 $C8_OPTIONS ava",
"test:xs": "yarn test:xs-unit && yarn test:xs-worker",
"test:xs-unit": "ava-xs",
"test:xs-worker": "SWINGSET_WORKER_TYPE=xs-worker ava -c 2 'test/swingsetTests/**/test-*.js'",
"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:*",
"lint:eslint": "eslint .",
Expand Down Expand Up @@ -68,14 +68,15 @@
"exclude": [
"swingsetTests",
"# fast-check unsupported",
"test/unitTests/test-amountProperties.js",
"test/unitTests/test-inputValidation.js",
"test/unitTests/test-issuerObj.js"
"test/unitTests/amountProperties.test.js",
"test/unitTests/inputValidation.test.js",
"test/unitTests/issuerObj.test.js"
]
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
5 changes: 3 additions & 2 deletions packages/SwingSet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "exit 0",
"test": "ava",
"test:xs": "SWINGSET_WORKER_TYPE=xs-worker ava",
"test:xs-worker": "ava test/workers/test-worker.js -m 'xsnap vat manager'",
"test:xs-worker": "ava test/workers -m 'xsnap vat manager'",
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
"lint:types": "tsc",
Expand Down Expand Up @@ -88,7 +88,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ export default function buildKernel(
// basically reverting 1cfbeaa3c925d0f8502edfb313ecb12a1cab5eac
// and then ultimately moved to the kernel in a MUCH diminished form
// (see #5342 and #6650, and testUpgrade in
// {@link ../../test/upgrade/test-upgrade.js}).
// {@link ../../test/upgrade/upgrade.test.js}).
// We hope to eventually add back correct sophisticated logic
// by e.g. having liveslots sweep the database when restoring a vat.

Expand Down Expand Up @@ -1867,7 +1867,7 @@ export default function buildKernel(
);
} else {
// this should only happen during unit tests that are too lazy to
// build a complete kernel: test/bundles/test-bundles-kernel.js
// build a complete kernel: test/bundles/bundles-kernel.test.js
console.log(`installBundle cannot notify, missing vatAdminRootKref`);
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { buildPatterns } from './message-patterns.js';
// This exercises all the patterns in 'message-patterns.js' twice with
// comms vats in the path (a different file runs them all with a
// direct connection). To enable/disable specific tests, run with e.g.
// 'yarn test test/test-message-patterns.js -m "test pattern a72
// 'yarn test test/message-patterns.test.js -m "test pattern a72
// comms"' or '-m "*a72 comms"'

// See message-patterns.js for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { buildPatterns } from './message-patterns.js';
// vatA/vatB connected directly through the kernel (a different file
// runs them all a second time with comms vats in the path). To
// enable/disable specific tests, run with e.g. 'yarn test
// test/test-message-patterns.js -m "test pattern a72 local"' or '-m
// test/message-patterns.test.js -m "test pattern a72 local"' or '-m
// "*a72 local"'

// See message-patterns.js for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ test('refcount while queued', async t => {
});

test('local promises are rejected by vat upgrade', async t => {
// TODO: Generalize packages/SwingSet/test/upgrade/test-upgrade.js
// TODO: Generalize packages/SwingSet/test/upgrade/upgrade.test.js
/** @type {SwingSetConfig} */
const config = {
includeDevDependencies: true, // for vat-data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot report for `test/test-state.js`
# Snapshot report for `test/state.test.js`

The actual snapshot is saved in `test-state.js.snap`.
The actual snapshot is saved in `state.test.js.snap`.

Generated by [AVA](https://avajs.dev).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot report for `test/test-xsnap-store.js`
# Snapshot report for `test/xsnap-store.test.js`

The actual snapshot is saved in `test-xsnap-store.js.snap`.
The actual snapshot is saved in `xsnap-store.test.js.snap`.

Generated by [AVA](https://avajs.dev).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ test('crankhash - initial state and additions', t => {
t.log(`\
This test fails under maintenance of initial kernel state.
If these changes are expected, run:
yarn test --update-snapshots test/test-state.js
yarn test --update-snapshots test/state.test.js
Then commit the changes in .../snapshots/ path.
`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ test('XS + SES snapshots are long-term deterministic', async t => {
t.log(`\
This test fails under maintenance of xsnap dependencies.
If these changes are expected, run:
yarn test --update-snapshots test/test-xsnap-store.js
yarn test --update-snapshots test/xsnap-store.test.js
Then commit the changes in .../snapshots/ path.
`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/tools/dvo-test-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const extractLog = capdata => stupidM.unserialize(capdata);
// 8 - Collect log messages from the test vat until it sends the `testComplete()` message
// 9 - Call `logCheck` with the sequence of log messages sent during the 'after' phase
//
// The SwingSet test `vo-test-harness/test-dvo-test-harness.js` and the
// The SwingSet test `vo-test-harness/dvo-test-harness.test.js` and the
// accompanying vat definition `vo-test-harness/vat-dvo-test-test.js` form a
// test of the durable VO test harness itself, but can be used as a simple
// example of how to set things up.
Expand Down
3 changes: 2 additions & 1 deletion packages/access-token/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
2 changes: 1 addition & 1 deletion packages/agoric-cli/.ava-integration-test.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @jessie-check

export default {
files: ['integration-tests/test-workflow.js'],
files: ['integration-tests/*.test.*'],
timeout: '10m',
workerThreads: false,
};
3 changes: 2 additions & 1 deletion packages/agoric-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"timeout": "2m",
"workerThreads": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot report for `test/test-inter-cli.js`
# Snapshot report for `test/inter-cli.test.js`

The actual snapshot is saved in `test-inter-cli.js.snap`.
The actual snapshot is saved in `inter-cli.test.js.snap`.

Generated by [AVA](https://avajs.dev).

Expand Down
4 changes: 4 additions & 0 deletions packages/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"ava": {
"require": [
"@endo/init/debug.js"
],
"files": [
"test/**/test-*.*",
"test/**/*.test.*"
]
},
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion packages/base-zone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"ts": "module"
},
"files": [
"test/**/test-*.js",
"test/**/test-*.ts"
"test/**/test-*.*",
"test/**/*.test.*"
],
"nodeArguments": [
"--loader=tsx",
Expand Down
6 changes: 3 additions & 3 deletions packages/boot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"build": "exit 0",
"test": "ava",
"test:xs": "SWINGSET_WORKER_TYPE=xs-worker ava 'test/bootstrapTests/**/test-*.js' 'test/upgrading/**/test-*.js'",
"test:xs": "SWINGSET_WORKER_TYPE=xs-worker ava test/bootstrapTests test/upgrading",
"lint-fix": "yarn lint:eslint --fix",
"lint": "run-s --continue-on-error lint:*",
"lint:types": "tsc",
Expand Down Expand Up @@ -77,8 +77,8 @@
"ts": "module"
},
"files": [
"test/**/test-*.js",
"test/**/test-*.ts"
"test/**/test-*.*",
"test/**/*.test.*"
],
"nodeArguments": [
"--loader=tsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/boot/test/bootstrapTests/ibcBridgeMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { M } from '@endo/patterns';
import { makeScalarBigMapStore } from '@agoric/vat-data';
import { makeDurableZone } from '@agoric/zone/durable.js';

// TODO: factor out overlap with packages/vats/test/test-network.js
// TODO: factor out overlap with packages/vats/test/network.test.js
export const makeBridge = (
t,
baggage = makeScalarBigMapStore('baggage', {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot report for `test/test-boot-config.js`
# Snapshot report for `test/boot-config.test.js`

The actual snapshot is saved in `test-boot-config.js.snap`.
The actual snapshot is saved in `boot-config.test.js.snap`.

Generated by [AVA](https://avajs.dev).

Expand Down
3 changes: 2 additions & 1 deletion packages/builders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
3 changes: 2 additions & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion packages/casting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"timeout": "20m",
"workerThreads": false
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions packages/casting/test/net-access-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const { stringify: jq } = JSON;

/**
* @file to regenerate
* 1. set RECORDING=true in test-interpose-net-access.js
* 2. run: yarn test test/test-test-interpose-net-access.js --update-snapshots
* 3. for each map in test-test-interpose-net-access.js.md, copy it and
* 1. set RECORDING=true in interpose-net-access.test.js
* 2. run: yarn test test/interpose-net-access.test.js --update-snapshots
* 3. for each map in interpose-net-access.test.js.md, copy it and
* 4. replace all occurences of => with : and paste as args to Object.fromEntries()
* 5. change RECORDING back to false
*/
Expand Down
3 changes: 2 additions & 1 deletion packages/cosmic-proto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"compile": false
},
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
]
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Snapshot report for `test/test-exports.js`
# Snapshot report for `test/exports.test.js`

The actual snapshot is saved in `test-exports.js.snap`.
The actual snapshot is saved in `exports.test.js.snap`.

Generated by [AVA](https://avajs.dev).

Expand Down
3 changes: 2 additions & 1 deletion packages/cosmic-swingset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
},
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"require": [
"@endo/init/debug.js"
Expand Down
3 changes: 2 additions & 1 deletion packages/create-dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"homepage": "https://github.com/Agoric/agoric-sdk#readme",
"ava": {
"files": [
"test/**/test-*.js"
"test/**/test-*.*",
"test/**/*.test.*"
],
"timeout": "2m",
"workerThreads": false
Expand Down
Loading
Loading