diff --git a/packages/base64/package.json b/packages/base64/package.json index be42b8b56c..7c1b02726e 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -70,7 +70,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/base64/test/test-main.js b/packages/base64/test/main.test.js similarity index 100% rename from packages/base64/test/test-main.js rename to packages/base64/test/main.test.js diff --git a/packages/bundle-source/package.json b/packages/bundle-source/package.json index c5abe17456..70a4e90cdc 100644 --- a/packages/bundle-source/package.json +++ b/packages/bundle-source/package.json @@ -67,7 +67,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ] }, "eslintConfig": { diff --git a/packages/bundle-source/test/test-bigint-transform.js b/packages/bundle-source/test/bigint-transform.test.js similarity index 100% rename from packages/bundle-source/test/test-bigint-transform.js rename to packages/bundle-source/test/bigint-transform.test.js diff --git a/packages/bundle-source/test/test-circular.js b/packages/bundle-source/test/circular.test.js similarity index 100% rename from packages/bundle-source/test/test-circular.js rename to packages/bundle-source/test/circular.test.js diff --git a/packages/bundle-source/test/test-comment.js b/packages/bundle-source/test/comment.test.js similarity index 100% rename from packages/bundle-source/test/test-comment.js rename to packages/bundle-source/test/comment.test.js diff --git a/packages/bundle-source/test/test-explicit.js b/packages/bundle-source/test/explicit.test.js similarity index 100% rename from packages/bundle-source/test/test-explicit.js rename to packages/bundle-source/test/explicit.test.js diff --git a/packages/bundle-source/test/test-external-fs.js b/packages/bundle-source/test/external-fs.test.js similarity index 100% rename from packages/bundle-source/test/test-external-fs.js rename to packages/bundle-source/test/external-fs.test.js diff --git a/packages/bundle-source/test/test-integrity.js b/packages/bundle-source/test/integrity.test.js similarity index 100% rename from packages/bundle-source/test/test-integrity.js rename to packages/bundle-source/test/integrity.test.js diff --git a/packages/bundle-source/test/test-sanity-unfiltered.js b/packages/bundle-source/test/sanity-unfiltered.test.js similarity index 100% rename from packages/bundle-source/test/test-sanity-unfiltered.js rename to packages/bundle-source/test/sanity-unfiltered.test.js diff --git a/packages/bundle-source/test/test-sanity.js b/packages/bundle-source/test/sanity.test.js similarity index 100% rename from packages/bundle-source/test/test-sanity.js rename to packages/bundle-source/test/sanity.test.js diff --git a/packages/bundle-source/test/test-tool-command.js b/packages/bundle-source/test/tool-command.test.js similarity index 100% rename from packages/bundle-source/test/test-tool-command.js rename to packages/bundle-source/test/tool-command.test.js diff --git a/packages/bundle-source/test/test-tool-library.js b/packages/bundle-source/test/tool-library.test.js similarity index 100% rename from packages/bundle-source/test/test-tool-library.js rename to packages/bundle-source/test/tool-library.test.js diff --git a/packages/captp/package.json b/packages/captp/package.json index 73039469ad..7486d7d2ba 100644 --- a/packages/captp/package.json +++ b/packages/captp/package.json @@ -67,7 +67,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/captp/test/test-crosstalk.js b/packages/captp/test/crosstalk.test.js similarity index 100% rename from packages/captp/test/test-crosstalk.js rename to packages/captp/test/crosstalk.test.js diff --git a/packages/captp/test/test-disco.js b/packages/captp/test/disco.test.js similarity index 100% rename from packages/captp/test/test-disco.js rename to packages/captp/test/disco.test.js diff --git a/packages/captp/test/test-export-hook.js b/packages/captp/test/export-hook.test.js similarity index 100% rename from packages/captp/test/test-export-hook.js rename to packages/captp/test/export-hook.test.js diff --git a/packages/captp/test/test-finalizing-map.js b/packages/captp/test/finalizing-map.test.js similarity index 100% rename from packages/captp/test/test-finalizing-map.js rename to packages/captp/test/finalizing-map.test.js diff --git a/packages/captp/test/test-gc.js b/packages/captp/test/gc.test.js similarity index 100% rename from packages/captp/test/test-gc.js rename to packages/captp/test/gc.test.js diff --git a/packages/captp/test/test-loopback.js b/packages/captp/test/loopback.test.js similarity index 100% rename from packages/captp/test/test-loopback.js rename to packages/captp/test/loopback.test.js diff --git a/packages/captp/test/test-trap.js b/packages/captp/test/trap.test.js similarity index 100% rename from packages/captp/test/test-trap.js rename to packages/captp/test/trap.test.js diff --git a/packages/check-bundle/package.json b/packages/check-bundle/package.json index 03acb0c827..6f61b63f6f 100644 --- a/packages/check-bundle/package.json +++ b/packages/check-bundle/package.json @@ -76,7 +76,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/check-bundle/test/test-check-bundle.js b/packages/check-bundle/test/check-bundle.test.js similarity index 100% rename from packages/check-bundle/test/test-check-bundle.js rename to packages/check-bundle/test/check-bundle.test.js diff --git a/packages/cjs-module-analyzer/package.json b/packages/cjs-module-analyzer/package.json index 0c14f5b90a..4934dd4f6d 100644 --- a/packages/cjs-module-analyzer/package.json +++ b/packages/cjs-module-analyzer/package.json @@ -59,7 +59,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/cjs-module-analyzer/test/test-cjs-module-analyzer.js b/packages/cjs-module-analyzer/test/cjs-module-analyzer.test.js similarity index 100% rename from packages/cjs-module-analyzer/test/test-cjs-module-analyzer.js rename to packages/cjs-module-analyzer/test/cjs-module-analyzer.test.js diff --git a/packages/cli/package.json b/packages/cli/package.json index bfba29b999..d167b396b5 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -74,7 +74,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/cli/src/commands/rename.js b/packages/cli/src/commands/move.js similarity index 50% rename from packages/cli/src/commands/rename.js rename to packages/cli/src/commands/move.js index 28e76b48ac..83d57641cb 100644 --- a/packages/cli/src/commands/rename.js +++ b/packages/cli/src/commands/move.js @@ -2,8 +2,9 @@ import os from 'os'; import { E } from '@endo/far'; import { withEndoAgent } from '../context.js'; +import { parsePetNamePath } from '../pet-name.js'; -export const rename = async ({ fromName, toName, agentNames }) => +export const move = async ({ fromPath, toPath, agentNames }) => withEndoAgent(agentNames, { os, process }, async ({ agent }) => { - await E(agent).rename(fromName, toName); + await E(agent).move(parsePetNamePath(fromPath), parsePetNamePath(toPath)); }); diff --git a/packages/cli/src/endo.js b/packages/cli/src/endo.js index 78fb665a09..54b01d692b 100644 --- a/packages/cli/src/endo.js +++ b/packages/cli/src/endo.js @@ -297,13 +297,14 @@ export const main = async rawArgs => { }); program - .command('rename ') + .command('move ') + .alias('mv') .description('change the name for a value') .option(...commonOptions.as) - .action(async (fromName, toName, cmd) => { + .action(async (fromPath, toPath, cmd) => { const { as: agentNames } = cmd.opts(); - const { rename } = await import('./commands/rename.js'); - return rename({ fromName, toName, agentNames }); + const { move } = await import('./commands/move.js'); + return move({ fromPath, toPath, agentNames }); }); program diff --git a/packages/cli/test/test-message-format.js b/packages/cli/test/message-format.test.js similarity index 100% rename from packages/cli/test/test-message-format.js rename to packages/cli/test/message-format.test.js diff --git a/packages/common/package.json b/packages/common/package.json index 3bae317b4f..af6f9f0c58 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -69,7 +69,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" } diff --git a/packages/common/test/test-apply-labeling-error.js b/packages/common/test/apply-labeling-error.test.js similarity index 100% rename from packages/common/test/test-apply-labeling-error.js rename to packages/common/test/apply-labeling-error.test.js diff --git a/packages/common/test/test-from-unique-entries.js b/packages/common/test/from-unique-entries.test.js similarity index 100% rename from packages/common/test/test-from-unique-entries.js rename to packages/common/test/from-unique-entries.test.js diff --git a/packages/common/test/test-ident-checker.js b/packages/common/test/ident-checker.test.js similarity index 100% rename from packages/common/test/test-ident-checker.js rename to packages/common/test/ident-checker.test.js diff --git a/packages/common/test/test-list-difference.js b/packages/common/test/list-difference.test.js similarity index 100% rename from packages/common/test/test-list-difference.js rename to packages/common/test/list-difference.test.js diff --git a/packages/common/test/test-make-array-iterator.js b/packages/common/test/make-array-iterator.test.js similarity index 100% rename from packages/common/test/test-make-array-iterator.js rename to packages/common/test/make-array-iterator.test.js diff --git a/packages/common/test/test-object-map.js b/packages/common/test/object-map.test.js similarity index 100% rename from packages/common/test/test-object-map.js rename to packages/common/test/object-map.test.js diff --git a/packages/common/test/test-object-meta-assign.js b/packages/common/test/object-meta-assign.test.js similarity index 100% rename from packages/common/test/test-object-meta-assign.js rename to packages/common/test/object-meta-assign.test.js diff --git a/packages/common/test/test-object-meta-map.js b/packages/common/test/object-meta-map.test.js similarity index 100% rename from packages/common/test/test-object-meta-map.js rename to packages/common/test/object-meta-map.test.js diff --git a/packages/common/test/test-throw-labeled.js b/packages/common/test/throw-labeled.test.js similarity index 100% rename from packages/common/test/test-throw-labeled.js rename to packages/common/test/throw-labeled.test.js diff --git a/packages/compartment-mapper/package.json b/packages/compartment-mapper/package.json index f53430bcb0..4e022334fa 100644 --- a/packages/compartment-mapper/package.json +++ b/packages/compartment-mapper/package.json @@ -93,7 +93,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/compartment-mapper/test/test-assets.js b/packages/compartment-mapper/test/assets.test.js similarity index 100% rename from packages/compartment-mapper/test/test-assets.js rename to packages/compartment-mapper/test/assets.test.js diff --git a/packages/compartment-mapper/test/test-bundle.js b/packages/compartment-mapper/test/bundle.test.js similarity index 100% rename from packages/compartment-mapper/test/test-bundle.js rename to packages/compartment-mapper/test/bundle.test.js diff --git a/packages/compartment-mapper/test/test-cjs-compat.js b/packages/compartment-mapper/test/cjs-compat.test.js similarity index 100% rename from packages/compartment-mapper/test/test-cjs-compat.js rename to packages/compartment-mapper/test/cjs-compat.test.js diff --git a/packages/compartment-mapper/test/test-cthuloop.js b/packages/compartment-mapper/test/cthuloop.test.js similarity index 100% rename from packages/compartment-mapper/test/test-cthuloop.js rename to packages/compartment-mapper/test/cthuloop.test.js diff --git a/packages/compartment-mapper/test/test-cycle-cjs.js b/packages/compartment-mapper/test/cycle-cjs.test.js similarity index 100% rename from packages/compartment-mapper/test/test-cycle-cjs.js rename to packages/compartment-mapper/test/cycle-cjs.test.js diff --git a/packages/compartment-mapper/test/test-cycle-mjs.js b/packages/compartment-mapper/test/cycle-mjs.test.js similarity index 100% rename from packages/compartment-mapper/test/test-cycle-mjs.js rename to packages/compartment-mapper/test/cycle-mjs.test.js diff --git a/packages/compartment-mapper/test/test-error-handling.js b/packages/compartment-mapper/test/error-handling.test.js similarity index 100% rename from packages/compartment-mapper/test/test-error-handling.js rename to packages/compartment-mapper/test/error-handling.test.js diff --git a/packages/compartment-mapper/test/test-exit-hook.js b/packages/compartment-mapper/test/exit-hook.test.js similarity index 100% rename from packages/compartment-mapper/test/test-exit-hook.js rename to packages/compartment-mapper/test/exit-hook.test.js diff --git a/packages/compartment-mapper/test/test-extension.js b/packages/compartment-mapper/test/extension.test.js similarity index 100% rename from packages/compartment-mapper/test/test-extension.js rename to packages/compartment-mapper/test/extension.test.js diff --git a/packages/compartment-mapper/test/test-infer-exports.js b/packages/compartment-mapper/test/infer-exports.test.js similarity index 100% rename from packages/compartment-mapper/test/test-infer-exports.js rename to packages/compartment-mapper/test/infer-exports.test.js diff --git a/packages/compartment-mapper/test/test-integrity.js b/packages/compartment-mapper/test/integrity.test.js similarity index 100% rename from packages/compartment-mapper/test/test-integrity.js rename to packages/compartment-mapper/test/integrity.test.js diff --git a/packages/compartment-mapper/test/test-join.js b/packages/compartment-mapper/test/join.test.js similarity index 100% rename from packages/compartment-mapper/test/test-join.js rename to packages/compartment-mapper/test/join.test.js diff --git a/packages/compartment-mapper/test/test-main.js b/packages/compartment-mapper/test/main.test.js similarity index 100% rename from packages/compartment-mapper/test/test-main.js rename to packages/compartment-mapper/test/main.test.js diff --git a/packages/compartment-mapper/test/test-missing-entry.js b/packages/compartment-mapper/test/missing-entry.test.js similarity index 100% rename from packages/compartment-mapper/test/test-missing-entry.js rename to packages/compartment-mapper/test/missing-entry.test.js diff --git a/packages/compartment-mapper/test/test-nested-pkg.js b/packages/compartment-mapper/test/nested-pkg.test.js similarity index 100% rename from packages/compartment-mapper/test/test-nested-pkg.js rename to packages/compartment-mapper/test/nested-pkg.test.js diff --git a/packages/compartment-mapper/test/test-optional.js b/packages/compartment-mapper/test/optional.test.js similarity index 100% rename from packages/compartment-mapper/test/test-optional.js rename to packages/compartment-mapper/test/optional.test.js diff --git a/packages/compartment-mapper/test/test-order.js b/packages/compartment-mapper/test/order.test.js similarity index 100% rename from packages/compartment-mapper/test/test-order.js rename to packages/compartment-mapper/test/order.test.js diff --git a/packages/compartment-mapper/test/test-policy-format.js b/packages/compartment-mapper/test/policy-format.test.js similarity index 100% rename from packages/compartment-mapper/test/test-policy-format.js rename to packages/compartment-mapper/test/policy-format.test.js diff --git a/packages/compartment-mapper/test/test-policy.js b/packages/compartment-mapper/test/policy.test.js similarity index 100% rename from packages/compartment-mapper/test/test-policy.js rename to packages/compartment-mapper/test/policy.test.js diff --git a/packages/compartment-mapper/test/test-relative.js b/packages/compartment-mapper/test/relative.test.js similarity index 100% rename from packages/compartment-mapper/test/test-relative.js rename to packages/compartment-mapper/test/relative.test.js diff --git a/packages/compartment-mapper/test/test-relativize.js b/packages/compartment-mapper/test/relativize.test.js similarity index 100% rename from packages/compartment-mapper/test/test-relativize.js rename to packages/compartment-mapper/test/relativize.test.js diff --git a/packages/compartment-mapper/test/test-resolve.js b/packages/compartment-mapper/test/resolve.test.js similarity index 100% rename from packages/compartment-mapper/test/test-resolve.js rename to packages/compartment-mapper/test/resolve.test.js diff --git a/packages/compartment-mapper/test/test-retained.js b/packages/compartment-mapper/test/retained.test.js similarity index 100% rename from packages/compartment-mapper/test/test-retained.js rename to packages/compartment-mapper/test/retained.test.js diff --git a/packages/compartment-mapper/test/snapshots/test-error-handling.js.md b/packages/compartment-mapper/test/snapshots/error-handling.test.js.md similarity index 98% rename from packages/compartment-mapper/test/snapshots/test-error-handling.js.md rename to packages/compartment-mapper/test/snapshots/error-handling.test.js.md index d043aad827..0bdaee0e8e 100644 --- a/packages/compartment-mapper/test/snapshots/test-error-handling.js.md +++ b/packages/compartment-mapper/test/snapshots/error-handling.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-error-handling.js` +# Snapshot report for `test/error-handling.test.js` -The actual snapshot is saved in `test-error-handling.js.snap`. +The actual snapshot is saved in `error-handling.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/compartment-mapper/test/snapshots/test-error-handling.js.snap b/packages/compartment-mapper/test/snapshots/error-handling.test.js.snap similarity index 100% rename from packages/compartment-mapper/test/snapshots/test-error-handling.js.snap rename to packages/compartment-mapper/test/snapshots/error-handling.test.js.snap diff --git a/packages/compartment-mapper/test/snapshots/test-infer-exports.js.md b/packages/compartment-mapper/test/snapshots/infer-exports.test.js.md similarity index 96% rename from packages/compartment-mapper/test/snapshots/test-infer-exports.js.md rename to packages/compartment-mapper/test/snapshots/infer-exports.test.js.md index c50a39c183..a4e98fb4a0 100644 --- a/packages/compartment-mapper/test/snapshots/test-infer-exports.js.md +++ b/packages/compartment-mapper/test/snapshots/infer-exports.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-infer-exports.js` +# Snapshot report for `test/infer-exports.test.js` -The actual snapshot is saved in `test-infer-exports.js.snap`. +The actual snapshot is saved in `infer-exports.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/compartment-mapper/test/snapshots/test-infer-exports.js.snap b/packages/compartment-mapper/test/snapshots/infer-exports.test.js.snap similarity index 100% rename from packages/compartment-mapper/test/snapshots/test-infer-exports.js.snap rename to packages/compartment-mapper/test/snapshots/infer-exports.test.js.snap diff --git a/packages/compartment-mapper/test/snapshots/test-policy-format.js.md b/packages/compartment-mapper/test/snapshots/policy-format.test.js.md similarity index 97% rename from packages/compartment-mapper/test/snapshots/test-policy-format.js.md rename to packages/compartment-mapper/test/snapshots/policy-format.test.js.md index f17be3b72f..2435308f44 100644 --- a/packages/compartment-mapper/test/snapshots/test-policy-format.js.md +++ b/packages/compartment-mapper/test/snapshots/policy-format.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-policy-format.js` +# Snapshot report for `test/policy-format.test.js` -The actual snapshot is saved in `test-policy-format.js.snap`. +The actual snapshot is saved in `policy-format.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/compartment-mapper/test/snapshots/test-policy-format.js.snap b/packages/compartment-mapper/test/snapshots/policy-format.test.js.snap similarity index 100% rename from packages/compartment-mapper/test/snapshots/test-policy-format.js.snap rename to packages/compartment-mapper/test/snapshots/policy-format.test.js.snap diff --git a/packages/compartment-mapper/test/snapshots/test-policy.js.md b/packages/compartment-mapper/test/snapshots/policy.test.js.md similarity index 99% rename from packages/compartment-mapper/test/snapshots/test-policy.js.md rename to packages/compartment-mapper/test/snapshots/policy.test.js.md index a9c594bb84..a74af4324b 100644 --- a/packages/compartment-mapper/test/snapshots/test-policy.js.md +++ b/packages/compartment-mapper/test/snapshots/policy.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-policy.js` +# Snapshot report for `test/policy.test.js` -The actual snapshot is saved in `test-policy.js.snap`. +The actual snapshot is saved in `policy.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/compartment-mapper/test/snapshots/test-policy.js.snap b/packages/compartment-mapper/test/snapshots/policy.test.js.snap similarity index 100% rename from packages/compartment-mapper/test/snapshots/test-policy.js.snap rename to packages/compartment-mapper/test/snapshots/policy.test.js.snap diff --git a/packages/compartment-mapper/test/test-source-url-rewrite.js b/packages/compartment-mapper/test/source-url-rewrite.test.js similarity index 100% rename from packages/compartment-mapper/test/test-source-url-rewrite.js rename to packages/compartment-mapper/test/source-url-rewrite.test.js diff --git a/packages/compartment-mapper/test/test-stability.js b/packages/compartment-mapper/test/stability.test.js similarity index 100% rename from packages/compartment-mapper/test/test-stability.js rename to packages/compartment-mapper/test/stability.test.js diff --git a/packages/compartment-mapper/test/test-stack.js b/packages/compartment-mapper/test/stack.test.js similarity index 100% rename from packages/compartment-mapper/test/test-stack.js rename to packages/compartment-mapper/test/stack.test.js diff --git a/packages/compartment-mapper/test/test-strictly-inconsistent.js b/packages/compartment-mapper/test/strictly-inconsistent.test.js similarity index 100% rename from packages/compartment-mapper/test/test-strictly-inconsistent.js rename to packages/compartment-mapper/test/strictly-inconsistent.test.js diff --git a/packages/compartment-mapper/test/test-symlink.js b/packages/compartment-mapper/test/symlink.test.js similarity index 100% rename from packages/compartment-mapper/test/test-symlink.js rename to packages/compartment-mapper/test/symlink.test.js diff --git a/packages/compartment-mapper/test/test-transform.js b/packages/compartment-mapper/test/transform.test.js similarity index 100% rename from packages/compartment-mapper/test/test-transform.js rename to packages/compartment-mapper/test/transform.test.js diff --git a/packages/daemon/package.json b/packages/daemon/package.json index b1b102de7b..061d172422 100644 --- a/packages/daemon/package.json +++ b/packages/daemon/package.json @@ -95,7 +95,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/daemon/src/directory.js b/packages/daemon/src/directory.js index c3600026e2..114dac1dc1 100644 --- a/packages/daemon/src/directory.js +++ b/packages/daemon/src/directory.js @@ -174,22 +174,25 @@ export const makeDirectoryMaker = ({ const { hub: fromHub, name: fromName } = await lookupTailNameHub(fromPath); const { hub: toHub, name: toName } = await lookupTailNameHub(toPath); + if (fromHub === toHub) { // eslint-disable-next-line no-use-before-define if (fromHub === directory) { await petStore.rename(fromName, toName); } else { - await fromHub.move([fromName], [toName]); + await E(fromHub).move([fromName], [toName]); } return; } - const id = await fromHub.identify(fromName); + + const id = await E(fromHub).identify(fromName); if (id === undefined) { throw new Error(`Unknown name: ${q(fromPath)}`); } - const removeP = fromHub.remove(fromName); - const addP = toHub.write([toName], id); - await Promise.all([addP, removeP]); + // First write to the "to" hub so that the original name is preserved on the + // "from" hub in case of failure. + await E(toHub).write([toName], id); + await E(fromHub).remove(fromName); }; /** @type {EndoDirectory['copy']} */ diff --git a/packages/daemon/src/pet-store.js b/packages/daemon/src/pet-store.js index 8c7ef48e95..d8fd7a968e 100644 --- a/packages/daemon/src/pet-store.js +++ b/packages/daemon/src/pet-store.js @@ -195,6 +195,7 @@ export const makePetStoreMaker = (filePowers, config) => { } assertValidId(formulaIdentifier, fromName); + // Updated persisted name mapping const fromPath = filePowers.joinPath(petNameDirectoryPath, fromName); const toPath = filePowers.joinPath(petNameDirectoryPath, toName); await filePowers.renamePath(fromPath, toPath); @@ -206,6 +207,7 @@ export const makePetStoreMaker = (filePowers, config) => { } // Update the mapping for the pet name. + idsToPetNames.delete(formulaIdentifier, fromName); idsToPetNames.add(formulaIdentifier, toName); publishNameRemoval(formulaIdentifier, fromName); diff --git a/packages/daemon/test/test-deferred-tasks.js b/packages/daemon/test/deferred-tasks.test.js similarity index 100% rename from packages/daemon/test/test-deferred-tasks.js rename to packages/daemon/test/deferred-tasks.test.js diff --git a/packages/daemon/test/test-endo.js b/packages/daemon/test/endo.test.js similarity index 88% rename from packages/daemon/test/test-endo.js rename to packages/daemon/test/endo.test.js index f8a6b2f31c..96e1841c1a 100644 --- a/packages/daemon/test/test-endo.js +++ b/packages/daemon/test/endo.test.js @@ -138,7 +138,7 @@ const prepareHostWithTestNetwork = async t => { const iteratorRef = E(host).followMessages(); const { value: message } = await E(iteratorRef).next(); const { number } = E.get(message); - await E(host).evaluate('MAIN', '`127.0.0.1:0`', [], [], 'netport'); + await E(host).storeValue('127.0.0.1:0', 'netport'); await E(host).resolve(await number, 'netport'); // move test network to network dir @@ -364,8 +364,7 @@ test('anonymous spawn and evaluate with new worker', async t => { test('spawning a worker does not overwrite existing non-worker name', async t => { const { host } = await prepareHost(t); - const foo = await E(host).evaluate('MAIN', '10', [], [], 'foo'); - t.is(foo, 10); + await E(host).storeValue(10, 'foo'); // This resolves with the existing value of 'foo' rather than overwriting it // with a new worker. @@ -439,6 +438,162 @@ test('store with name', async t => { } }); +test('move renames value', async t => { + const { host } = await prepareHost(t); + + await E(host).storeValue(10, 'ten'); + + t.true(await E(host).has('ten')); + t.false(await E(host).has('zehn')); + + await E(host).move(['ten'], ['zehn']); + + t.false(await E(host).has('ten')); + t.true(await E(host).has('zehn')); +}); + +test('move renames value, overwriting the "to" name', async t => { + const { host } = await prepareHost(t); + + await E(host).storeValue(10, 'ten'); + await E(host).storeValue('"X"', 'decimus'); + + t.true(await E(host).has('ten')); + t.true(await E(host).has('decimus')); + + await E(host).move(['ten'], ['decimus']); + + t.false(await E(host).has('ten')); + t.true(await E(host).has('decimus')); + + const decimusValue = await E(host).lookup('decimus'); + t.is(decimusValue, 10); +}); + +test('move moves value, from the host to a different name hub', async t => { + const { host } = await prepareHost(t); + const directory = await E(host).makeDirectory('directory'); + + await E(host).storeValue(10, 'ten'); + + t.true(await E(host).has('ten')); + t.false(await E(directory).has('ten')); + + await E(host).move(['ten'], ['directory', 'ten']); + + t.false(await E(host).has('ten')); + t.true(await E(directory).has('ten')); +}); + +test('move renames value, for a single guest', async t => { + const { host } = await prepareHost(t); + + const guest = await E(host).provideGuest('guest', { + agentName: 'guest-agent', + }); + + await E(host).storeValue(10, 'ten'); + await E(host).move(['ten'], ['guest-agent', 'ten']); + + t.true(await E(guest).has('ten')); + + await E(host).move(['guest-agent', 'ten'], ['guest-agent', 'zehn']); + + t.false(await E(guest).has('ten')); + t.true(await E(guest).has('zehn')); +}); + +test('move moves value, between different guests', async t => { + const { host } = await prepareHost(t); + + const guest1 = await E(host).provideGuest('guest1', { + agentName: 'guest1-agent', + }); + const guest2 = await E(host).provideGuest('guest2', { + agentName: 'guest2-agent', + }); + + await E(host).storeValue(10, 'ten'); + await E(host).move(['ten'], ['guest1-agent', 'ten']); + + t.true(await E(guest1).has('ten')); + + await E(host).move(['guest1-agent', 'ten'], ['guest2-agent', 'ten']); + + t.false(await E(guest1).has('ten')); + t.true(await E(guest2).has('ten')); +}); + +test('move renames value, for a single caplet name hub', async t => { + const { host } = await prepareHost(t); + + const nameHubPath = path.join(dirname, 'test', 'move-hub.js'); + const nameHub = await E(host).makeUnconfined( + 'MAIN', + nameHubPath, + 'NONE', + 'name-hub', + ); + + await E(host).storeValue(10, 'ten'); + const tenId = await E(host).identify('ten'); + await E(nameHub).write(['ten'], tenId); + + t.true(await E(nameHub).has('ten')); + + await E(host).move(['name-hub', 'ten'], ['name-hub', 'zehn']); + + t.false(await E(nameHub).has('ten')); + t.true(await E(nameHub).has('zehn')); +}); + +test('move moves value, between different caplet name hubs', async t => { + const { host } = await prepareHost(t); + + const nameHubPath = path.join(dirname, 'test', 'move-hub.js'); + const nameHub1 = await E(host).makeUnconfined( + 'MAIN', + nameHubPath, + 'NONE', + 'name-hub1', + ); + const nameHub2 = await E(host).makeUnconfined( + 'MAIN', + nameHubPath, + 'NONE', + 'name-hub2', + ); + + await E(host).storeValue(10, 'ten'); + const tenId = await E(host).identify('ten'); + await E(nameHub1).write(['ten'], tenId); + + t.true(await E(nameHub1).has('ten')); + + await E(host).move(['name-hub1', 'ten'], ['name-hub2', 'ten']); + + t.false(await E(nameHub1).has('ten')); + t.true(await E(nameHub2).has('ten')); +}); + +test('move preserves original name if writing to new name hub fails', async t => { + const { host } = await prepareHost(t); + + await E(host).storeValue(10, 'ten'); + + t.true(await E(host).has('ten')); + + const failedHubPath = path.join(dirname, 'test', 'failed-hub.js'); + await E(host).makeUnconfined('MAIN', failedHubPath, 'NONE', 'failed-hub'); + + await t.throwsAsync(E(host).move(['ten'], ['failed-hub', 'ten']), { + message: 'I had one job.', + }); + + const tenValue = await E(host).lookup('ten'); + t.is(tenValue, 10); +}); + test('closure state lost by restart', async t => { const { cancelled, config } = await prepareConfig(t); @@ -718,7 +873,7 @@ test('followNameChanges publishes new names', async t => { const changesIterator = await prepareFollowNameChangesIterator(host); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const { value } = await changesIterator.next(); t.is(value.add, 'ten'); @@ -729,7 +884,7 @@ test('followNameChanges publishes removed names', async t => { const changesIterator = await prepareFollowNameChangesIterator(host); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); await changesIterator.next(); await E(host).remove('ten'); @@ -742,7 +897,7 @@ test('followNameChanges publishes renamed names', async t => { const changesIterator = await prepareFollowNameChangesIterator(host); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); await changesIterator.next(); await E(host).move(['ten'], ['zehn']); @@ -758,19 +913,19 @@ test('followNameChanges publishes renamed names (existing mappings for both name const changesIterator = await prepareFollowNameChangesIterator(host); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); await changesIterator.next(); - await E(host).evaluate('MAIN', '"german 10"', [], [], 'zehn'); + await E(host).storeValue('"X"', 'decimus'); await changesIterator.next(); - await E(host).move(['ten'], ['zehn']); + await E(host).move(['ten'], ['decimus']); let { value } = await changesIterator.next(); - t.is(value.remove, 'zehn'); + t.is(value.remove, 'decimus'); value = (await changesIterator.next()).value; t.is(value.remove, 'ten'); value = (await changesIterator.next()).value; - t.is(value.add, 'zehn'); + t.is(value.add, 'decimus'); }); test('followNameChanges does not notify of redundant pet store writes', async t => { @@ -778,7 +933,7 @@ test('followNameChanges does not notify of redundant pet store writes', async t const changesIterator = await prepareFollowNameChangesIterator(host); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); await changesIterator.next(); const tenId = await E(host).identify('ten'); @@ -786,7 +941,7 @@ test('followNameChanges does not notify of redundant pet store writes', async t // Create a new value and observe its publication, proving that nothing was // published as as result of the redundant write. - await E(host).evaluate('MAIN', '11', [], [], 'eleven'); + await E(host).storeValue(11, 'eleven'); const { value } = await changesIterator.next(); t.is(value.add, 'eleven'); }); @@ -794,7 +949,7 @@ test('followNameChanges does not notify of redundant pet store writes', async t test('followLocatorNameChanges first publishes existing pet name', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const tenLocatorSub = makeRefIterator( @@ -833,7 +988,7 @@ test('followLocatorNameChanges first publishes existing pet and special names', test('followLocatorNameChanges publishes added names', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const changesIterator = await prepareFollowLocatorNameChangesIterator( @@ -850,7 +1005,7 @@ test('followLocatorNameChanges publishes added names', async t => { test('followLocatorNameChanges publishes removed names', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); await E(host).write(['zehn'], idFromLocator(tenLocator)); @@ -868,7 +1023,7 @@ test('followLocatorNameChanges publishes removed names', async t => { test('followLocatorNameChanges publishes renamed names', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const changesIterator = await prepareFollowLocatorNameChangesIterator( @@ -887,37 +1042,37 @@ test('followLocatorNameChanges publishes renamed names', async t => { test('followLocatorNameChanges publishes renamed names (existing mappings for both names)', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); - await E(host).evaluate('MAIN', '"german 10"', [], [], 'zehn'); + await E(host).storeValue(10, 'ten'); + await E(host).storeValue('"X"', 'decimus'); const tenLocator = await E(host).locate('ten'); - const zehnLocator = await E(host).locate('zehn'); + const decimusLocator = await E(host).locate('decimus'); const tenChangesIterator = await prepareFollowLocatorNameChangesIterator( host, tenLocator, ); - const zehnChangesIterator = await prepareFollowLocatorNameChangesIterator( + const decimusChangesIterator = await prepareFollowLocatorNameChangesIterator( host, - zehnLocator, + decimusLocator, ); - await E(host).move(['ten'], ['zehn']); + await E(host).move(['ten'], ['decimus']); - // First, changes for "zehn" - let { value } = await zehnChangesIterator.next(); - t.deepEqual(value, { remove: zehnLocator, names: ['zehn'] }); + // First, changes for "decimus" + let { value } = await decimusChangesIterator.next(); + t.deepEqual(value, { remove: decimusLocator, names: ['decimus'] }); // Then, changes for "ten" value = (await tenChangesIterator.next()).value; t.deepEqual(value, { remove: tenLocator, names: ['ten'] }); value = (await tenChangesIterator.next()).value; - t.deepEqual(value, { add: tenLocator, names: ['zehn'] }); + t.deepEqual(value, { add: tenLocator, names: ['decimus'] }); }); test('followLocatorNameChanges does not notify of redundant pet store writes', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const changesIterator = await prepareFollowLocatorNameChangesIterator( @@ -1310,8 +1465,7 @@ test('lookup with single petname', async t => { const { host } = await prepareHost(t); await E(host).provideGuest('guest'); - const ten = await E(host).evaluate('MAIN', '10', [], [], 'ten'); - t.is(ten, 10); + await E(host).storeValue(10, 'ten'); const resolvedValue = await E(host).evaluate( 'MAIN', @@ -1354,7 +1508,7 @@ test('lookup with petname path (caplet with lookup method)', async t => { test('lookup with petname path (value has no lookup method)', async t => { const { host } = await prepareHost(t); - await E(host).evaluate('MAIN', '10', [], [], 'ten'); + await E(host).storeValue(10, 'ten'); await t.throwsAsync( E(host).evaluate( 'MAIN', @@ -1519,12 +1673,11 @@ test('hello from afar', async t => { test('locate local value', async t => { const { host } = await prepareHost(t); - const ten = await E(host).evaluate('MAIN', '10', [], [], 'ten'); - t.is(ten, 10); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const parsedLocator = parseLocator(tenLocator); - t.is(parsedLocator.formulaType, 'eval'); + t.is(parsedLocator.formulaType, 'marshal'); }); test('locate local persisted value', async t => { @@ -1532,8 +1685,7 @@ test('locate local persisted value', async t => { { const { host } = await makeHost(config, cancelled); - const ten = await E(host).evaluate('MAIN', '10', [], [], 'ten'); - t.is(ten, 10); + await E(host).storeValue(10, 'ten'); } await restart(config); @@ -1542,7 +1694,7 @@ test('locate local persisted value', async t => { const { host } = await makeHost(config, cancelled); const tenLocator = await E(host).locate('ten'); const parsedLocator = parseLocator(tenLocator); - t.is(parsedLocator.formulaType, 'eval'); + t.is(parsedLocator.formulaType, 'marshal'); } }); @@ -1593,8 +1745,7 @@ test('invite, accept, and send mail', async t => { test('reverse locate local value', async t => { const { host } = await prepareHost(t); - const ten = await E(host).evaluate('MAIN', '10', [], [], 'ten'); - t.is(ten, 10); + await E(host).storeValue(10, 'ten'); const tenLocator = await E(host).locate('ten'); const [reverseLocatedName] = await E(host).reverseLocate(tenLocator); @@ -1606,8 +1757,7 @@ test('reverse locate local persisted value', async t => { { const { host } = await makeHost(config, cancelled); - const ten = await E(host).evaluate('MAIN', '10', [], [], 'ten'); - t.is(ten, 10); + await E(host).storeValue(10, 'ten'); } await restart(config); diff --git a/packages/daemon/test/failed-hub.js b/packages/daemon/test/failed-hub.js new file mode 100644 index 0000000000..0ad941e20f --- /dev/null +++ b/packages/daemon/test/failed-hub.js @@ -0,0 +1,14 @@ +import { makeExo } from '@endo/exo'; +import { M } from '@endo/patterns'; + +export const make = () => { + return makeExo( + 'FailedHub', + M.interface('FailedHub', {}, { defaultGuards: 'passable' }), + { + write() { + throw new Error('I had one job.'); + }, + }, + ); +}; diff --git a/packages/daemon/test/test-formula-type.js b/packages/daemon/test/formula-type.test.js similarity index 100% rename from packages/daemon/test/test-formula-type.js rename to packages/daemon/test/formula-type.test.js diff --git a/packages/daemon/test/test-locator.js b/packages/daemon/test/locator.test.js similarity index 100% rename from packages/daemon/test/test-locator.js rename to packages/daemon/test/locator.test.js diff --git a/packages/daemon/test/move-hub.js b/packages/daemon/test/move-hub.js new file mode 100644 index 0000000000..aedc0b1c8b --- /dev/null +++ b/packages/daemon/test/move-hub.js @@ -0,0 +1,96 @@ +// @ts-check + +import { makeExo } from '@endo/exo'; +import { M } from '@endo/patterns'; + +const { quote: q } = assert; + +/** @import {NameHub} from '../src/types.js' */ + +// This caplet is a mock name hub for testing NameHub.move(). +export const make = () => { + /** @type {Map} */ + const idToName = new Map(); + /** @type {Map} */ + const nameToId = new Map(); + + /** + * We only support paths of length 1. + * @param {Array} petNamePath + */ + const parsePetNamePath = petNamePath => { + if (!Array.isArray(petNamePath) || petNamePath.length !== 1) { + throw new Error(`Unexpected pet name path ${q(petNamePath)}`); + } + return petNamePath[0]; + }; + + /** + * @param {string} petName + */ + const expectGetId = petName => { + const id = nameToId.get(petName); + if (id === undefined) { + throw new Error(`Unknown pet name ${q(petName)}`); + } + return id; + }; + + /** + * @type {NameHub['write']} + */ + const write = async (petNamePath, id) => { + const petName = parsePetNamePath(petNamePath); + idToName.set(id, petName); + nameToId.set(petName, id); + }; + + /** + * @type {NameHub['remove']} + */ + const remove = async (...petNamePath) => { + const petName = parsePetNamePath(petNamePath); + const id = expectGetId(petName); + + nameToId.delete(petName); + idToName.delete(id); + }; + + return makeExo( + 'MoveHub', + M.interface('MoveHub', {}, { defaultGuards: 'passable' }), + { + write, + remove, + + /** + * @type {NameHub['identify']} + */ + async identify(...petNamePath) { + const petName = parsePetNamePath(petNamePath); + return nameToId.get(petName); + }, + + /** + * @type {NameHub['move']} + */ + async move(fromPath, toPath) { + const fromName = parsePetNamePath(fromPath); + const id = expectGetId(fromName); + + const toName = parsePetNamePath(toPath); + + await remove(fromName); + await write([toName], id); + }, + + /** + * @type {NameHub['has']} + */ + async has(...petNamePath) { + const petName = parsePetNamePath(petNamePath); + return nameToId.has(petName); + }, + }, + ); +}; diff --git a/packages/daemon/test/test-multimap.js b/packages/daemon/test/multimap.test.js similarity index 100% rename from packages/daemon/test/test-multimap.js rename to packages/daemon/test/multimap.test.js diff --git a/packages/daemon/test/test-pubsub.js b/packages/daemon/test/pubsub.test.js similarity index 100% rename from packages/daemon/test/test-pubsub.js rename to packages/daemon/test/pubsub.test.js diff --git a/packages/daemon/test/test-remote-control.js b/packages/daemon/test/remote-control.test.js similarity index 100% rename from packages/daemon/test/test-remote-control.js rename to packages/daemon/test/remote-control.test.js diff --git a/packages/daemon/test/test-serial-jobs.js b/packages/daemon/test/serial-jobs.test.js similarity index 100% rename from packages/daemon/test/test-serial-jobs.js rename to packages/daemon/test/serial-jobs.test.js diff --git a/packages/env-options/package.json b/packages/env-options/package.json index 3dfb885fd6..62c1b381ce 100644 --- a/packages/env-options/package.json +++ b/packages/env-options/package.json @@ -77,7 +77,8 @@ "prettier": null, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/errors/package.json b/packages/errors/package.json index 20e01747ae..78e3074c04 100644 --- a/packages/errors/package.json +++ b/packages/errors/package.json @@ -63,7 +63,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/errors/test/test-index.js b/packages/errors/test/index.test.js similarity index 100% rename from packages/errors/test/test-index.js rename to packages/errors/test/index.test.js diff --git a/packages/errors/test/test-ses0_18_3.js b/packages/errors/test/ses0_18_3.test.js similarity index 100% rename from packages/errors/test/test-ses0_18_3.js rename to packages/errors/test/ses0_18_3.test.js diff --git a/packages/eslint-plugin/lib/configs/imports.js b/packages/eslint-plugin/lib/configs/imports.js index 75c467018b..23482f3a48 100644 --- a/packages/eslint-plugin/lib/configs/imports.js +++ b/packages/eslint-plugin/lib/configs/imports.js @@ -9,7 +9,6 @@ module.exports = { '**/*.config.*.js', // leading wildcard to work in CLI (package path) and IDE (repo path) '**/test/**', - '**/test-*.js', '**/demo*/**/*.js', '**/scripts/**/*.js', ], diff --git a/packages/evasive-transform/package.json b/packages/evasive-transform/package.json index b01baffc5c..eb790ccb59 100644 --- a/packages/evasive-transform/package.json +++ b/packages/evasive-transform/package.json @@ -70,7 +70,8 @@ "prettier": null, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/evasive-transform/test/test-evade-censor.js b/packages/evasive-transform/test/evade-censor.test.js similarity index 100% rename from packages/evasive-transform/test/test-evade-censor.js rename to packages/evasive-transform/test/evade-censor.test.js diff --git a/packages/evasive-transform/test/test-location-unmapper.js b/packages/evasive-transform/test/location-unmapper.test.js similarity index 100% rename from packages/evasive-transform/test/test-location-unmapper.js rename to packages/evasive-transform/test/location-unmapper.test.js diff --git a/packages/evasive-transform/test/snapshots/test-evade-censor.js.md b/packages/evasive-transform/test/snapshots/evade-censor.test.js.md similarity index 97% rename from packages/evasive-transform/test/snapshots/test-evade-censor.js.md rename to packages/evasive-transform/test/snapshots/evade-censor.test.js.md index 94af869fa9..db937fd3d5 100644 --- a/packages/evasive-transform/test/snapshots/test-evade-censor.js.md +++ b/packages/evasive-transform/test/snapshots/evade-censor.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-evade-censor.js` +# Snapshot report for `test/evade-censor.test.js` -The actual snapshot is saved in `test-evade-censor.js.snap`. +The actual snapshot is saved in `evade-censor.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/evasive-transform/test/snapshots/test-evade-censor.js.snap b/packages/evasive-transform/test/snapshots/evade-censor.test.js.snap similarity index 100% rename from packages/evasive-transform/test/snapshots/test-evade-censor.js.snap rename to packages/evasive-transform/test/snapshots/evade-censor.test.js.snap diff --git a/packages/evasive-transform/test/snapshots/test-transform-source.js.md b/packages/evasive-transform/test/snapshots/transform-source.test.js.md similarity index 97% rename from packages/evasive-transform/test/snapshots/test-transform-source.js.md rename to packages/evasive-transform/test/snapshots/transform-source.test.js.md index df9e2f1ef4..af5305912f 100644 --- a/packages/evasive-transform/test/snapshots/test-transform-source.js.md +++ b/packages/evasive-transform/test/snapshots/transform-source.test.js.md @@ -1,6 +1,6 @@ -# Snapshot report for `test/test-transform-source.js` +# Snapshot report for `test/transform-source.test.js` -The actual snapshot is saved in `test-transform-source.js.snap`. +The actual snapshot is saved in `transform-source.test.js.snap`. Generated by [AVA](https://avajs.dev). diff --git a/packages/evasive-transform/test/snapshots/test-transform-source.js.snap b/packages/evasive-transform/test/snapshots/transform-source.test.js.snap similarity index 100% rename from packages/evasive-transform/test/snapshots/test-transform-source.js.snap rename to packages/evasive-transform/test/snapshots/transform-source.test.js.snap diff --git a/packages/evasive-transform/test/test-transform-comment.js b/packages/evasive-transform/test/transform-comment.test.js similarity index 100% rename from packages/evasive-transform/test/test-transform-comment.js rename to packages/evasive-transform/test/transform-comment.test.js diff --git a/packages/eventual-send/package.json b/packages/eventual-send/package.json index 90035b1ac3..c16f193742 100644 --- a/packages/eventual-send/package.json +++ b/packages/eventual-send/package.json @@ -65,7 +65,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/eventual-send/test/test-deep-send.js b/packages/eventual-send/test/deep-send.test.js similarity index 100% rename from packages/eventual-send/test/test-deep-send.js rename to packages/eventual-send/test/deep-send.test.js diff --git a/packages/eventual-send/test/test-deep-stacks.js b/packages/eventual-send/test/deep-stacks.test.js similarity index 100% rename from packages/eventual-send/test/test-deep-stacks.js rename to packages/eventual-send/test/deep-stacks.test.js diff --git a/packages/eventual-send/test/test-e.js b/packages/eventual-send/test/e.test.js similarity index 100% rename from packages/eventual-send/test/test-e.js rename to packages/eventual-send/test/e.test.js diff --git a/packages/eventual-send/test/test-eventual-send.js b/packages/eventual-send/test/eventual-send.test.js similarity index 100% rename from packages/eventual-send/test/test-eventual-send.js rename to packages/eventual-send/test/eventual-send.test.js diff --git a/packages/eventual-send/test/test-hp.js b/packages/eventual-send/test/hp.test.js similarity index 100% rename from packages/eventual-send/test/test-hp.js rename to packages/eventual-send/test/hp.test.js diff --git a/packages/eventual-send/test/test-proxy.js b/packages/eventual-send/test/proxy.test.js similarity index 100% rename from packages/eventual-send/test/test-proxy.js rename to packages/eventual-send/test/proxy.test.js diff --git a/packages/eventual-send/test/test-thenable.js b/packages/eventual-send/test/thenable.test.js similarity index 100% rename from packages/eventual-send/test/test-thenable.js rename to packages/eventual-send/test/thenable.test.js diff --git a/packages/eventual-send/test/test-types.js b/packages/eventual-send/test/types.test.js similarity index 100% rename from packages/eventual-send/test/test-types.js rename to packages/eventual-send/test/types.test.js diff --git a/packages/exo/package.json b/packages/exo/package.json index 3f57e1c666..3b1ddb49e8 100644 --- a/packages/exo/package.json +++ b/packages/exo/package.json @@ -71,7 +71,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/exo/test/test-amplify-heap-class-kits.js b/packages/exo/test/amplify-heap-class-kits.test.js similarity index 100% rename from packages/exo/test/test-amplify-heap-class-kits.js rename to packages/exo/test/amplify-heap-class-kits.test.js diff --git a/packages/exo/test/test-exo-class-js-class.js b/packages/exo/test/exo-class-js-class.test.js similarity index 100% rename from packages/exo/test/test-exo-class-js-class.js rename to packages/exo/test/exo-class-js-class.test.js diff --git a/packages/exo/test/test-exo-only-throwables.js b/packages/exo/test/exo-only-throwables.test.js similarity index 100% rename from packages/exo/test/test-exo-only-throwables.js rename to packages/exo/test/exo-only-throwables.test.js diff --git a/packages/exo/test/test-exo-wobbly-point.js b/packages/exo/test/exo-wobbly-point.test.js similarity index 100% rename from packages/exo/test/test-exo-wobbly-point.js rename to packages/exo/test/exo-wobbly-point.test.js diff --git a/packages/exo/test/test-heap-classes.js b/packages/exo/test/heap-classes.test.js similarity index 100% rename from packages/exo/test/test-heap-classes.js rename to packages/exo/test/heap-classes.test.js diff --git a/packages/exo/test/test-is-instance-heap-class-kits.js b/packages/exo/test/is-instance-heap-class-kits.test.js similarity index 100% rename from packages/exo/test/test-is-instance-heap-class-kits.js rename to packages/exo/test/is-instance-heap-class-kits.test.js diff --git a/packages/exo/test/test-label-instances.js b/packages/exo/test/label-instances.test.js similarity index 100% rename from packages/exo/test/test-label-instances.js rename to packages/exo/test/label-instances.test.js diff --git a/packages/exo/test/test-legacy-guard-tolerance.js b/packages/exo/test/legacy-guard-tolerance.test.js similarity index 100% rename from packages/exo/test/test-legacy-guard-tolerance.js rename to packages/exo/test/legacy-guard-tolerance.test.js diff --git a/packages/exo/test/test-non-enumerable-methods.js b/packages/exo/test/non-enumerable-methods.test.js similarity index 100% rename from packages/exo/test/test-non-enumerable-methods.js rename to packages/exo/test/non-enumerable-methods.test.js diff --git a/packages/far/package.json b/packages/far/package.json index 2b1954a1cf..d3c8b0153e 100644 --- a/packages/far/package.json +++ b/packages/far/package.json @@ -67,7 +67,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/far/test/test-e.js b/packages/far/test/e.test.js similarity index 100% rename from packages/far/test/test-e.js rename to packages/far/test/e.test.js diff --git a/packages/far/test/test-marshal-far-function.js b/packages/far/test/marshal-far-function.test.js similarity index 100% rename from packages/far/test/test-marshal-far-function.js rename to packages/far/test/marshal-far-function.test.js diff --git a/packages/far/test/test-marshal-far-obj.js b/packages/far/test/marshal-far-obj.test.js similarity index 100% rename from packages/far/test/test-marshal-far-obj.js rename to packages/far/test/marshal-far-obj.test.js diff --git a/packages/import-bundle/package.json b/packages/import-bundle/package.json index d7f5d2422a..e49b75b8bb 100644 --- a/packages/import-bundle/package.json +++ b/packages/import-bundle/package.json @@ -69,7 +69,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/import-bundle/test/test-compartment-wrapper.js b/packages/import-bundle/test/compartment-wrapper.test.js similarity index 100% rename from packages/import-bundle/test/test-compartment-wrapper.js rename to packages/import-bundle/test/compartment-wrapper.test.js diff --git a/packages/import-bundle/test/test-import-bundle.js b/packages/import-bundle/test/import-bundle.test.js similarity index 100% rename from packages/import-bundle/test/test-import-bundle.js rename to packages/import-bundle/test/import-bundle.test.js diff --git a/packages/init/package.json b/packages/init/package.json index b312275e3e..81ed861b00 100644 --- a/packages/init/package.json +++ b/packages/init/package.json @@ -58,7 +58,8 @@ "homepage": "https://github.com/endojs/endo#readme", "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ] }, "eslintConfig": { diff --git a/packages/init/test/test-async_hooks.js b/packages/init/test/async_hooks.test.js similarity index 100% rename from packages/init/test/test-async_hooks.js rename to packages/init/test/async_hooks.test.js diff --git a/packages/init/test/test-bundle.js b/packages/init/test/bundle.test.js similarity index 100% rename from packages/init/test/test-bundle.js rename to packages/init/test/bundle.test.js diff --git a/packages/init/test/test-init.js b/packages/init/test/init.test.js similarity index 100% rename from packages/init/test/test-init.js rename to packages/init/test/init.test.js diff --git a/packages/init/test/test-unsafe-fast.js b/packages/init/test/unsafe-fast.test.js similarity index 100% rename from packages/init/test/test-unsafe-fast.js rename to packages/init/test/unsafe-fast.test.js diff --git a/packages/lockdown/package.json b/packages/lockdown/package.json index 521bfd7669..8df91c3e77 100644 --- a/packages/lockdown/package.json +++ b/packages/lockdown/package.json @@ -43,7 +43,8 @@ "homepage": "https://github.com/endojs/endo#readme", "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ] }, "eslintConfig": { diff --git a/packages/lp32/package.json b/packages/lp32/package.json index c18d7e9220..a37e2a21b9 100644 --- a/packages/lp32/package.json +++ b/packages/lp32/package.json @@ -85,7 +85,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/lp32/test/test-lp32.js b/packages/lp32/test/lp32.test.js similarity index 100% rename from packages/lp32/test/test-lp32.js rename to packages/lp32/test/lp32.test.js diff --git a/packages/marshal/package.json b/packages/marshal/package.json index f71c5b4a9b..1505e57f47 100644 --- a/packages/marshal/package.json +++ b/packages/marshal/package.json @@ -75,7 +75,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/marshal/test/test-dot-membrane.js b/packages/marshal/test/dot-membrane.test.js similarity index 100% rename from packages/marshal/test/test-dot-membrane.js rename to packages/marshal/test/dot-membrane.test.js diff --git a/packages/marshal/test/test-encode-slot-in-promise.js b/packages/marshal/test/encode-slot-in-promise.test.js similarity index 100% rename from packages/marshal/test/test-encode-slot-in-promise.js rename to packages/marshal/test/encode-slot-in-promise.test.js diff --git a/packages/marshal/test/test-encodePassable.js b/packages/marshal/test/encodePassable.test.js similarity index 100% rename from packages/marshal/test/test-encodePassable.js rename to packages/marshal/test/encodePassable.test.js diff --git a/packages/marshal/test/test-marshal-capdata.js b/packages/marshal/test/marshal-capdata.test.js similarity index 100% rename from packages/marshal/test/test-marshal-capdata.js rename to packages/marshal/test/marshal-capdata.test.js diff --git a/packages/marshal/test/test-marshal-far-function.js b/packages/marshal/test/marshal-far-function.test.js similarity index 100% rename from packages/marshal/test/test-marshal-far-function.js rename to packages/marshal/test/marshal-far-function.test.js diff --git a/packages/marshal/test/test-marshal-far-obj.js b/packages/marshal/test/marshal-far-obj.test.js similarity index 100% rename from packages/marshal/test/test-marshal-far-obj.js rename to packages/marshal/test/marshal-far-obj.test.js diff --git a/packages/marshal/test/test-marshal-justin.js b/packages/marshal/test/marshal-justin.test.js similarity index 100% rename from packages/marshal/test/test-marshal-justin.js rename to packages/marshal/test/marshal-justin.test.js diff --git a/packages/marshal/test/test-marshal-serialization.js b/packages/marshal/test/marshal-serialization.test.js similarity index 100% rename from packages/marshal/test/test-marshal-serialization.js rename to packages/marshal/test/marshal-serialization.test.js diff --git a/packages/marshal/test/test-marshal-smallcaps.js b/packages/marshal/test/marshal-smallcaps.test.js similarity index 100% rename from packages/marshal/test/test-marshal-smallcaps.js rename to packages/marshal/test/marshal-smallcaps.test.js diff --git a/packages/marshal/test/test-marshal-stringify.js b/packages/marshal/test/marshal-stringify.test.js similarity index 100% rename from packages/marshal/test/test-marshal-stringify.js rename to packages/marshal/test/marshal-stringify.test.js diff --git a/packages/marshal/test/test-marshal-testing.js b/packages/marshal/test/marshal-testing.test.js similarity index 100% rename from packages/marshal/test/test-marshal-testing.js rename to packages/marshal/test/marshal-testing.test.js diff --git a/packages/marshal/test/test-rankOrder.js b/packages/marshal/test/rankOrder.test.js similarity index 100% rename from packages/marshal/test/test-rankOrder.js rename to packages/marshal/test/rankOrder.test.js diff --git a/packages/memoize/package.json b/packages/memoize/package.json index 6453f59e21..d55cd136a5 100644 --- a/packages/memoize/package.json +++ b/packages/memoize/package.json @@ -67,7 +67,8 @@ "prettier": null, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/memoize/test/test-memoize.js b/packages/memoize/test/memoize.test.js similarity index 100% rename from packages/memoize/test/test-memoize.js rename to packages/memoize/test/memoize.test.js diff --git a/packages/nat/package.json b/packages/nat/package.json index c659b60bc4..9d695b3edf 100644 --- a/packages/nat/package.json +++ b/packages/nat/package.json @@ -56,7 +56,8 @@ ], "ava": { "files": [ - "test/**/*.js" + "test/**/test-*.*", + "test/**/*.test.*" ] }, "publishConfig": { diff --git a/packages/nat/test/test-endo.js b/packages/nat/test/endo.test.js similarity index 100% rename from packages/nat/test/test-endo.js rename to packages/nat/test/endo.test.js diff --git a/packages/nat/test/test-nat.js b/packages/nat/test/nat.test.js similarity index 100% rename from packages/nat/test/test-nat.js rename to packages/nat/test/nat.test.js diff --git a/packages/netstring/package.json b/packages/netstring/package.json index 65f03263e5..001d0c9f6b 100644 --- a/packages/netstring/package.json +++ b/packages/netstring/package.json @@ -69,7 +69,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/netstring/test/test-netstring.js b/packages/netstring/test/netstring.test.js similarity index 100% rename from packages/netstring/test/test-netstring.js rename to packages/netstring/test/netstring.test.js diff --git a/packages/pass-style/package.json b/packages/pass-style/package.json index 7699450c7a..ae10a9110c 100644 --- a/packages/pass-style/package.json +++ b/packages/pass-style/package.json @@ -72,7 +72,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/pass-style/test/test-errors.js b/packages/pass-style/test/errors.test.js similarity index 100% rename from packages/pass-style/test/test-errors.js rename to packages/pass-style/test/errors.test.js diff --git a/packages/pass-style/test/test-far-class-instances.js b/packages/pass-style/test/far-class-instances.test.js similarity index 100% rename from packages/pass-style/test/test-far-class-instances.js rename to packages/pass-style/test/far-class-instances.test.js diff --git a/packages/pass-style/test/test-far-wobbly-point.js b/packages/pass-style/test/far-wobbly-point.test.js similarity index 100% rename from packages/pass-style/test/test-far-wobbly-point.js rename to packages/pass-style/test/far-wobbly-point.test.js diff --git a/packages/pass-style/test/test-message-breakpoints-demo.js b/packages/pass-style/test/message-breakpoints-demo.test.js similarity index 100% rename from packages/pass-style/test/test-message-breakpoints-demo.js rename to packages/pass-style/test/message-breakpoints-demo.test.js diff --git a/packages/pass-style/test/test-message-breakpoints.js b/packages/pass-style/test/message-breakpoints.test.js similarity index 100% rename from packages/pass-style/test/test-message-breakpoints.js rename to packages/pass-style/test/message-breakpoints.test.js diff --git a/packages/pass-style/test/test-passStyleOf.js b/packages/pass-style/test/passStyleOf.test.js similarity index 100% rename from packages/pass-style/test/test-passStyleOf.js rename to packages/pass-style/test/passStyleOf.test.js diff --git a/packages/pass-style/test/test-passable-string.js b/packages/pass-style/test/passable-string.test.js similarity index 100% rename from packages/pass-style/test/test-passable-string.js rename to packages/pass-style/test/passable-string.test.js diff --git a/packages/pass-style/test/test-safe-promise.js b/packages/pass-style/test/safe-promise.test.js similarity index 100% rename from packages/pass-style/test/test-safe-promise.js rename to packages/pass-style/test/safe-promise.test.js diff --git a/packages/patterns/package.json b/packages/patterns/package.json index 4615773a32..10d698138f 100644 --- a/packages/patterns/package.json +++ b/packages/patterns/package.json @@ -68,7 +68,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/patterns/test/test-copyBag.js b/packages/patterns/test/copyBag.test.js similarity index 100% rename from packages/patterns/test/test-copyBag.js rename to packages/patterns/test/copyBag.test.js diff --git a/packages/patterns/test/test-copyMap.js b/packages/patterns/test/copyMap.test.js similarity index 100% rename from packages/patterns/test/test-copyMap.js rename to packages/patterns/test/copyMap.test.js diff --git a/packages/patterns/test/test-copySet.js b/packages/patterns/test/copySet.test.js similarity index 100% rename from packages/patterns/test/test-copySet.js rename to packages/patterns/test/copySet.test.js diff --git a/packages/patterns/test/test-pattern-limits.js b/packages/patterns/test/pattern-limits.test.js similarity index 100% rename from packages/patterns/test/test-pattern-limits.js rename to packages/patterns/test/pattern-limits.test.js diff --git a/packages/patterns/test/test-patterns.js b/packages/patterns/test/patterns.test.js similarity index 100% rename from packages/patterns/test/test-patterns.js rename to packages/patterns/test/patterns.test.js diff --git a/packages/promise-kit/package.json b/packages/promise-kit/package.json index 19114287b3..aa7bccaddc 100644 --- a/packages/promise-kit/package.json +++ b/packages/promise-kit/package.json @@ -70,7 +70,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/promise-kit/test/test-promise-kit.js b/packages/promise-kit/test/promise-kit.test.js similarity index 100% rename from packages/promise-kit/test/test-promise-kit.js rename to packages/promise-kit/test/promise-kit.test.js diff --git a/packages/ses-ava/package.json b/packages/ses-ava/package.json index f344d6c5cd..e63c17cf8b 100644 --- a/packages/ses-ava/package.json +++ b/packages/ses-ava/package.json @@ -73,7 +73,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/ses-ava/test/test-env-options.js b/packages/ses-ava/test/env-options.test.js similarity index 100% rename from packages/ses-ava/test/test-env-options.js rename to packages/ses-ava/test/env-options.test.js diff --git a/packages/ses-ava/test/test-raw-ava-reject.js b/packages/ses-ava/test/raw-ava-reject.test.js similarity index 100% rename from packages/ses-ava/test/test-raw-ava-reject.js rename to packages/ses-ava/test/raw-ava-reject.test.js diff --git a/packages/ses-ava/test/test-raw-ava-throw.js b/packages/ses-ava/test/raw-ava-throw.test.js similarity index 100% rename from packages/ses-ava/test/test-raw-ava-throw.js rename to packages/ses-ava/test/raw-ava-throw.test.js diff --git a/packages/ses-ava/test/test-ses-ava-reject.js b/packages/ses-ava/test/ses-ava-reject.test.js similarity index 100% rename from packages/ses-ava/test/test-ses-ava-reject.js rename to packages/ses-ava/test/ses-ava-reject.test.js diff --git a/packages/ses-ava/test/test-ses-ava-throw.js b/packages/ses-ava/test/ses-ava-throw.test.js similarity index 100% rename from packages/ses-ava/test/test-ses-ava-throw.js rename to packages/ses-ava/test/ses-ava-throw.test.js diff --git a/packages/ses/package.json b/packages/ses/package.json index d2d49937b9..b84f1f8498 100644 --- a/packages/ses/package.json +++ b/packages/ses/package.json @@ -191,7 +191,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/ses/test/test-anticipate-async-iterator-helpers-shimmed.js b/packages/ses/test/anticipate-async-iterator-helpers-shimmed.test.js similarity index 100% rename from packages/ses/test/test-anticipate-async-iterator-helpers-shimmed.js rename to packages/ses/test/anticipate-async-iterator-helpers-shimmed.test.js diff --git a/packages/ses/test/test-anticipate-iterator-helpers-shimmed.js b/packages/ses/test/anticipate-iterator-helpers-shimmed.test.js similarity index 100% rename from packages/ses/test/test-anticipate-iterator-helpers-shimmed.js rename to packages/ses/test/anticipate-iterator-helpers-shimmed.test.js diff --git a/packages/ses/test/test-backslash-u-identifier.js b/packages/ses/test/backslash-u-identifier.test.js similarity index 100% rename from packages/ses/test/test-backslash-u-identifier.js rename to packages/ses/test/backslash-u-identifier.test.js diff --git a/packages/ses/test/test-break-function-eval.js b/packages/ses/test/break-function-eval.test.js similarity index 100% rename from packages/ses/test/test-break-function-eval.js rename to packages/ses/test/break-function-eval.test.js diff --git a/packages/ses/test/test-compartment-constructor.js b/packages/ses/test/compartment-constructor.test.js similarity index 100% rename from packages/ses/test/test-compartment-constructor.js rename to packages/ses/test/compartment-constructor.test.js diff --git a/packages/ses/test/test-compartment-instance.js b/packages/ses/test/compartment-instance.test.js similarity index 100% rename from packages/ses/test/test-compartment-instance.js rename to packages/ses/test/compartment-instance.test.js diff --git a/packages/ses/test/test-compartment-prototype.js b/packages/ses/test/compartment-prototype.test.js similarity index 100% rename from packages/ses/test/test-compartment-prototype.js rename to packages/ses/test/compartment-prototype.test.js diff --git a/packages/ses/test/test-compartment-transforms.js b/packages/ses/test/compartment-transforms.test.js similarity index 100% rename from packages/ses/test/test-compartment-transforms.js rename to packages/ses/test/compartment-transforms.test.js diff --git a/packages/ses/test/test-compartment.js b/packages/ses/test/compartment.test.js similarity index 100% rename from packages/ses/test/test-compartment.js rename to packages/ses/test/compartment.test.js diff --git a/packages/ses/test/test-confinement.js b/packages/ses/test/confinement.test.js similarity index 100% rename from packages/ses/test/test-confinement.js rename to packages/ses/test/confinement.test.js diff --git a/packages/ses/test/test-console-error-trap.js b/packages/ses/test/console-error-trap.test.js similarity index 100% rename from packages/ses/test/test-console-error-trap.js rename to packages/ses/test/console-error-trap.test.js diff --git a/packages/ses/test/test-console-rejection-trap.js b/packages/ses/test/console-rejection-trap.test.js similarity index 100% rename from packages/ses/test/test-console-rejection-trap.js rename to packages/ses/test/console-rejection-trap.test.js diff --git a/packages/ses/test/test-enable-default-overrides-default.js b/packages/ses/test/enable-default-overrides-default.test.js similarity index 100% rename from packages/ses/test/test-enable-default-overrides-default.js rename to packages/ses/test/enable-default-overrides-default.test.js diff --git a/packages/ses/test/test-enable-property-overrides-default-unsafeError.js b/packages/ses/test/enable-property-overrides-default-unsafeError.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-default-unsafeError.js rename to packages/ses/test/enable-property-overrides-default-unsafeError.test.js diff --git a/packages/ses/test/test-enable-property-overrides-default.js b/packages/ses/test/enable-property-overrides-default.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-default.js rename to packages/ses/test/enable-property-overrides-default.test.js diff --git a/packages/ses/test/test-enable-property-overrides-min-unsafeError.js b/packages/ses/test/enable-property-overrides-min-unsafeError.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-min-unsafeError.js rename to packages/ses/test/enable-property-overrides-min-unsafeError.test.js diff --git a/packages/ses/test/test-enable-property-overrides-min.js b/packages/ses/test/enable-property-overrides-min.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-min.js rename to packages/ses/test/enable-property-overrides-min.test.js diff --git a/packages/ses/test/test-enable-property-overrides-severe-debug.js b/packages/ses/test/enable-property-overrides-severe-debug.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-severe-debug.js rename to packages/ses/test/enable-property-overrides-severe-debug.test.js diff --git a/packages/ses/test/test-enable-property-overrides-severe.js b/packages/ses/test/enable-property-overrides-severe.test.js similarity index 100% rename from packages/ses/test/test-enable-property-overrides-severe.js rename to packages/ses/test/enable-property-overrides-severe.test.js diff --git a/packages/ses/test/error/test-aggregate-error-console-demo.js b/packages/ses/test/error/aggregate-error-console-demo.test.js similarity index 100% rename from packages/ses/test/error/test-aggregate-error-console-demo.js rename to packages/ses/test/error/aggregate-error-console-demo.test.js diff --git a/packages/ses/test/error/test-aggregate-error-console.js b/packages/ses/test/error/aggregate-error-console.test.js similarity index 100% rename from packages/ses/test/error/test-aggregate-error-console.js rename to packages/ses/test/error/aggregate-error-console.test.js diff --git a/packages/ses/test/error/test-aggregate-error.js b/packages/ses/test/error/aggregate-error.test.js similarity index 100% rename from packages/ses/test/error/test-aggregate-error.js rename to packages/ses/test/error/aggregate-error.test.js diff --git a/packages/ses/test/error/test-assert-log.js b/packages/ses/test/error/assert-log.test.js similarity index 100% rename from packages/ses/test/error/test-assert-log.js rename to packages/ses/test/error/assert-log.test.js diff --git a/packages/ses/test/error/test-assert.js b/packages/ses/test/error/assert.test.js similarity index 100% rename from packages/ses/test/error/test-assert.js rename to packages/ses/test/error/assert.test.js diff --git a/packages/ses/test/error/test-error-cause-console.js b/packages/ses/test/error/error-cause-console.test.js similarity index 100% rename from packages/ses/test/error/test-error-cause-console.js rename to packages/ses/test/error/error-cause-console.test.js diff --git a/packages/ses/test/error/test-error-cause.js b/packages/ses/test/error/error-cause.test.js similarity index 100% rename from packages/ses/test/error/test-error-cause.js rename to packages/ses/test/error/error-cause.test.js diff --git a/packages/ses/test/error/test-filtering-console.js b/packages/ses/test/error/filtering-console.test.js similarity index 100% rename from packages/ses/test/error/test-filtering-console.js rename to packages/ses/test/error/filtering-console.test.js diff --git a/packages/ses/test/error/test-note-log-args.js b/packages/ses/test/error/note-log-args.test.js similarity index 100% rename from packages/ses/test/error/test-note-log-args.js rename to packages/ses/test/error/note-log-args.test.js diff --git a/packages/ses/test/error/test-permit-removal-warnings.js b/packages/ses/test/error/permit-removal-warnings.test.js similarity index 100% rename from packages/ses/test/error/test-permit-removal-warnings.js rename to packages/ses/test/error/permit-removal-warnings.test.js diff --git a/packages/ses/test/error/test-stringfy-utils.js b/packages/ses/test/error/stringfy-utils.test.js similarity index 100% rename from packages/ses/test/error/test-stringfy-utils.js rename to packages/ses/test/error/stringfy-utils.test.js diff --git a/packages/ses/test/error/test-tame-console-unfilteredError.js b/packages/ses/test/error/tame-console-unfilteredError.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unfilteredError.js rename to packages/ses/test/error/tame-console-unfilteredError.test.js diff --git a/packages/ses/test/error/test-tame-console-unsafe-unfilteredError.js b/packages/ses/test/error/tame-console-unsafe-unfilteredError.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unsafe-unfilteredError.js rename to packages/ses/test/error/tame-console-unsafe-unfilteredError.test.js diff --git a/packages/ses/test/error/test-tame-console-unsafe-unsafeError-unfilteredError.js b/packages/ses/test/error/tame-console-unsafe-unsafeError-unfilteredError.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unsafe-unsafeError-unfilteredError.js rename to packages/ses/test/error/tame-console-unsafe-unsafeError-unfilteredError.test.js diff --git a/packages/ses/test/error/test-tame-console-unsafe-unsafeError.js b/packages/ses/test/error/tame-console-unsafe-unsafeError.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unsafe-unsafeError.js rename to packages/ses/test/error/tame-console-unsafe-unsafeError.test.js diff --git a/packages/ses/test/error/test-tame-console-unsafe.js b/packages/ses/test/error/tame-console-unsafe.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unsafe.js rename to packages/ses/test/error/tame-console-unsafe.test.js diff --git a/packages/ses/test/error/test-tame-console-unsafeError.js b/packages/ses/test/error/tame-console-unsafeError.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console-unsafeError.js rename to packages/ses/test/error/tame-console-unsafeError.test.js diff --git a/packages/ses/test/error/test-tame-console.js b/packages/ses/test/error/tame-console.test.js similarity index 100% rename from packages/ses/test/error/test-tame-console.js rename to packages/ses/test/error/tame-console.test.js diff --git a/packages/ses/test/error/test-tame-v8-error-unit.js b/packages/ses/test/error/tame-v8-error-unit.test.js similarity index 100% rename from packages/ses/test/error/test-tame-v8-error-unit.js rename to packages/ses/test/error/tame-v8-error-unit.test.js diff --git a/packages/ses/test/error/test-tame-v8-error-unsafe.js b/packages/ses/test/error/tame-v8-error-unsafe.test.js similarity index 100% rename from packages/ses/test/error/test-tame-v8-error-unsafe.js rename to packages/ses/test/error/tame-v8-error-unsafe.test.js diff --git a/packages/ses/test/error/test-tame-v8-error.js b/packages/ses/test/error/tame-v8-error.test.js similarity index 100% rename from packages/ses/test/error/test-tame-v8-error.js rename to packages/ses/test/error/tame-v8-error.test.js diff --git a/packages/ses/test/error/test-v8-concise-stack-filtering-unit-tests.js b/packages/ses/test/error/v8-concise-stack-filtering-unit-tests.test.js similarity index 100% rename from packages/ses/test/error/test-v8-concise-stack-filtering-unit-tests.js rename to packages/ses/test/error/v8-concise-stack-filtering-unit-tests.test.js diff --git a/packages/ses/test/test-evade-html-comment.js b/packages/ses/test/evade-html-comment.test.js similarity index 100% rename from packages/ses/test/test-evade-html-comment.js rename to packages/ses/test/evade-html-comment.test.js diff --git a/packages/ses/test/test-evade-import-expression.js b/packages/ses/test/evade-import-expression.test.js similarity index 100% rename from packages/ses/test/test-evade-import-expression.js rename to packages/ses/test/evade-import-expression.test.js diff --git a/packages/ses/test/test-eval-scope.js b/packages/ses/test/eval-scope.test.js similarity index 100% rename from packages/ses/test/test-eval-scope.js rename to packages/ses/test/eval-scope.test.js diff --git a/packages/ses/test/test-evalTaming-default.js b/packages/ses/test/evalTaming-default.test.js similarity index 100% rename from packages/ses/test/test-evalTaming-default.js rename to packages/ses/test/evalTaming-default.test.js diff --git a/packages/ses/test/test-evalTaming-noEval.js b/packages/ses/test/evalTaming-noEval.test.js similarity index 100% rename from packages/ses/test/test-evalTaming-noEval.js rename to packages/ses/test/evalTaming-noEval.test.js diff --git a/packages/ses/test/test-evalTaming-safeEval.js b/packages/ses/test/evalTaming-safeEval.test.js similarity index 100% rename from packages/ses/test/test-evalTaming-safeEval.js rename to packages/ses/test/evalTaming-safeEval.test.js diff --git a/packages/ses/test/test-evalTaming-unsafe.js b/packages/ses/test/evalTaming-unsafe.test.js similarity index 100% rename from packages/ses/test/test-evalTaming-unsafe.js rename to packages/ses/test/evalTaming-unsafe.test.js diff --git a/packages/ses/test/test-frozen-anon-intrinsics.js b/packages/ses/test/frozen-anon-intrinsics.test.js similarity index 100% rename from packages/ses/test/test-frozen-anon-intrinsics.js rename to packages/ses/test/frozen-anon-intrinsics.test.js diff --git a/packages/ses/test/test-frozen-primordials.js b/packages/ses/test/frozen-primordials.test.js similarity index 100% rename from packages/ses/test/test-frozen-primordials.js rename to packages/ses/test/frozen-primordials.test.js diff --git a/packages/ses/test/test-get-global-intrinsics.js b/packages/ses/test/get-global-intrinsics.test.js similarity index 100% rename from packages/ses/test/test-get-global-intrinsics.js rename to packages/ses/test/get-global-intrinsics.test.js diff --git a/packages/ses/test/test-get-source-url.js b/packages/ses/test/get-source-url.test.js similarity index 100% rename from packages/ses/test/test-get-source-url.js rename to packages/ses/test/get-source-url.test.js diff --git a/packages/ses/test/test-global-lexicals-evaluate.js b/packages/ses/test/global-lexicals-evaluate.test.js similarity index 100% rename from packages/ses/test/test-global-lexicals-evaluate.js rename to packages/ses/test/global-lexicals-evaluate.test.js diff --git a/packages/ses/test/test-global-object-mutability.js b/packages/ses/test/global-object-mutability.test.js similarity index 100% rename from packages/ses/test/test-global-object-mutability.js rename to packages/ses/test/global-object-mutability.test.js diff --git a/packages/ses/test/test-global-object-properties.js b/packages/ses/test/global-object-properties.test.js similarity index 100% rename from packages/ses/test/test-global-object-properties.js rename to packages/ses/test/global-object-properties.test.js diff --git a/packages/ses/test/test-global-object.js b/packages/ses/test/global-object.test.js similarity index 100% rename from packages/ses/test/test-global-object.js rename to packages/ses/test/global-object.test.js diff --git a/packages/ses/test/test-harden-before-lockdown.js b/packages/ses/test/harden-before-lockdown.test.js similarity index 100% rename from packages/ses/test/test-harden-before-lockdown.js rename to packages/ses/test/harden-before-lockdown.test.js diff --git a/packages/ses/test/test-harden.js b/packages/ses/test/harden.test.js similarity index 100% rename from packages/ses/test/test-harden.js rename to packages/ses/test/harden.test.js diff --git a/packages/ses/test/test-identity-continuity.js b/packages/ses/test/identity-continuity.test.js similarity index 100% rename from packages/ses/test/test-identity-continuity.js rename to packages/ses/test/identity-continuity.test.js diff --git a/packages/ses/test/test-import-cjs.js b/packages/ses/test/import-cjs.test.js similarity index 100% rename from packages/ses/test/test-import-cjs.js rename to packages/ses/test/import-cjs.test.js diff --git a/packages/ses/test/test-import-gauntlet.js b/packages/ses/test/import-gauntlet.test.js similarity index 100% rename from packages/ses/test/test-import-gauntlet.js rename to packages/ses/test/import-gauntlet.test.js diff --git a/packages/ses/test/test-import-non-esm.js b/packages/ses/test/import-non-esm.test.js similarity index 100% rename from packages/ses/test/test-import-non-esm.js rename to packages/ses/test/import-non-esm.test.js diff --git a/packages/ses/test/test-import-stack-traces.js b/packages/ses/test/import-stack-traces.test.js similarity index 100% rename from packages/ses/test/test-import-stack-traces.js rename to packages/ses/test/import-stack-traces.test.js diff --git a/packages/ses/test/test-import.js b/packages/ses/test/import.test.js similarity index 100% rename from packages/ses/test/test-import.js rename to packages/ses/test/import.test.js diff --git a/packages/ses/test/test-is-typed-array.js b/packages/ses/test/is-typed-array.test.js similarity index 100% rename from packages/ses/test/test-is-typed-array.js rename to packages/ses/test/is-typed-array.test.js diff --git a/packages/ses/test/test-lockdown-compartment.js b/packages/ses/test/lockdown-compartment.test.js similarity index 100% rename from packages/ses/test/test-lockdown-compartment.js rename to packages/ses/test/lockdown-compartment.test.js diff --git a/packages/ses/test/test-lockdown-options.js b/packages/ses/test/lockdown-options.test.js similarity index 100% rename from packages/ses/test/test-lockdown-options.js rename to packages/ses/test/lockdown-options.test.js diff --git a/packages/ses/test/test-lockdown-shimmed-process.js b/packages/ses/test/lockdown-shimmed-process.test.js similarity index 100% rename from packages/ses/test/test-lockdown-shimmed-process.js rename to packages/ses/test/lockdown-shimmed-process.test.js diff --git a/packages/ses/test/test-lockdown.js b/packages/ses/test/lockdown.test.js similarity index 100% rename from packages/ses/test/test-lockdown.js rename to packages/ses/test/lockdown.test.js diff --git a/packages/ses/test/test-lru-cache-map.js b/packages/ses/test/lru-cache-map.test.js similarity index 100% rename from packages/ses/test/test-lru-cache-map.js rename to packages/ses/test/lru-cache-map.test.js diff --git a/packages/ses/test/test-make-eval-function.js b/packages/ses/test/make-eval-function.test.js similarity index 100% rename from packages/ses/test/test-make-eval-function.js rename to packages/ses/test/make-eval-function.test.js diff --git a/packages/ses/test/test-make-evaluate.js b/packages/ses/test/make-evaluate.test.js similarity index 100% rename from packages/ses/test/test-make-evaluate.js rename to packages/ses/test/make-evaluate.test.js diff --git a/packages/ses/test/test-make-function-constructor.js b/packages/ses/test/make-function-constructor.test.js similarity index 100% rename from packages/ses/test/test-make-function-constructor.js rename to packages/ses/test/make-function-constructor.test.js diff --git a/packages/ses/test/test-make-hardener.js b/packages/ses/test/make-hardener.test.js similarity index 100% rename from packages/ses/test/test-make-hardener.js rename to packages/ses/test/make-hardener.test.js diff --git a/packages/ses/test/test-make-safe-evaluator.js b/packages/ses/test/make-safe-evaluator.test.js similarity index 100% rename from packages/ses/test/test-make-safe-evaluator.js rename to packages/ses/test/make-safe-evaluator.test.js diff --git a/packages/ses/test/test-module-proxy.js b/packages/ses/test/module-proxy.test.js similarity index 100% rename from packages/ses/test/test-module-proxy.js rename to packages/ses/test/module-proxy.test.js diff --git a/packages/ses/test/test-module-static-record.js b/packages/ses/test/module-static-record.test.js similarity index 100% rename from packages/ses/test/test-module-static-record.js rename to packages/ses/test/module-static-record.test.js diff --git a/packages/ses/test/test-native-harden.js b/packages/ses/test/native-harden.test.js similarity index 100% rename from packages/ses/test/test-native-harden.js rename to packages/ses/test/native-harden.test.js diff --git a/packages/ses/test/test-nesting.js b/packages/ses/test/nesting.test.js similarity index 100% rename from packages/ses/test/test-nesting.js rename to packages/ses/test/nesting.test.js diff --git a/packages/ses/test/test-no-direct-eval.js b/packages/ses/test/no-direct-eval.test.js similarity index 100% rename from packages/ses/test/test-no-direct-eval.js rename to packages/ses/test/no-direct-eval.test.js diff --git a/packages/ses/test/test-no-eval.js b/packages/ses/test/no-eval.test.js similarity index 100% rename from packages/ses/test/test-no-eval.js rename to packages/ses/test/no-eval.test.js diff --git a/packages/ses/test/test-node.js b/packages/ses/test/node.test.js similarity index 100% rename from packages/ses/test/test-node.js rename to packages/ses/test/node.test.js diff --git a/packages/ses/test/test-package.js b/packages/ses/test/package.test.js similarity index 100% rename from packages/ses/test/test-package.js rename to packages/ses/test/package.test.js diff --git a/packages/ses/test/test-permits-intrinsics.js b/packages/ses/test/permits-intrinsics.test.js similarity index 100% rename from packages/ses/test/test-permits-intrinsics.js rename to packages/ses/test/permits-intrinsics.test.js diff --git a/packages/ses/test/test-permits.js b/packages/ses/test/permits.test.js similarity index 100% rename from packages/ses/test/test-permits.js rename to packages/ses/test/permits.test.js diff --git a/packages/ses/test/test-property-override.js b/packages/ses/test/property-override.test.js similarity index 100% rename from packages/ses/test/test-property-override.js rename to packages/ses/test/property-override.test.js diff --git a/packages/ses/test/test-reject-direct-eval.js b/packages/ses/test/reject-direct-eval.test.js similarity index 100% rename from packages/ses/test/test-reject-direct-eval.js rename to packages/ses/test/reject-direct-eval.test.js diff --git a/packages/ses/test/test-reject-html-comment.js b/packages/ses/test/reject-html-comment.test.js similarity index 100% rename from packages/ses/test/test-reject-html-comment.js rename to packages/ses/test/reject-html-comment.test.js diff --git a/packages/ses/test/test-reject-import-expression.js b/packages/ses/test/reject-import-expression.test.js similarity index 100% rename from packages/ses/test/test-reject-import-expression.js rename to packages/ses/test/reject-import-expression.test.js diff --git a/packages/ses/test/test-repair-intrinsics.js b/packages/ses/test/repair-intrinsics.test.js similarity index 100% rename from packages/ses/test/test-repair-intrinsics.js rename to packages/ses/test/repair-intrinsics.test.js diff --git a/packages/ses/test/test-scope-constants.js b/packages/ses/test/scope-constants.test.js similarity index 100% rename from packages/ses/test/test-scope-constants.js rename to packages/ses/test/scope-constants.test.js diff --git a/packages/ses/test/test-scope.js b/packages/ses/test/scope.test.js similarity index 100% rename from packages/ses/test/test-scope.js rename to packages/ses/test/scope.test.js diff --git a/packages/ses/test/test-ses.js b/packages/ses/test/ses.test.js similarity index 100% rename from packages/ses/test/test-ses.js rename to packages/ses/test/ses.test.js diff --git a/packages/ses/test/test-sloppy-globals-scope-terminator.js b/packages/ses/test/sloppy-globals-scope-terminator.test.js similarity index 100% rename from packages/ses/test/test-sloppy-globals-scope-terminator.js rename to packages/ses/test/sloppy-globals-scope-terminator.test.js diff --git a/packages/ses/test/test-strict-scope-terminator.js b/packages/ses/test/strict-scope-terminator.test.js similarity index 100% rename from packages/ses/test/test-strict-scope-terminator.js rename to packages/ses/test/strict-scope-terminator.test.js diff --git a/packages/ses/test/test-suppress-direct-eval.js b/packages/ses/test/suppress-direct-eval.test.js similarity index 100% rename from packages/ses/test/test-suppress-direct-eval.js rename to packages/ses/test/suppress-direct-eval.test.js diff --git a/packages/ses/test/test-tame-date-unit.js b/packages/ses/test/tame-date-unit.test.js similarity index 100% rename from packages/ses/test/test-tame-date-unit.js rename to packages/ses/test/tame-date-unit.test.js diff --git a/packages/ses/test/test-tame-date.js b/packages/ses/test/tame-date.test.js similarity index 100% rename from packages/ses/test/test-tame-date.js rename to packages/ses/test/tame-date.test.js diff --git a/packages/ses/test/test-tame-domains-after-lockdown.js b/packages/ses/test/tame-domains-after-lockdown.test.js similarity index 100% rename from packages/ses/test/test-tame-domains-after-lockdown.js rename to packages/ses/test/tame-domains-after-lockdown.test.js diff --git a/packages/ses/test/test-tame-domains-before-lockdown.js b/packages/ses/test/tame-domains-before-lockdown.test.js similarity index 100% rename from packages/ses/test/test-tame-domains-before-lockdown.js rename to packages/ses/test/tame-domains-before-lockdown.test.js diff --git a/packages/ses/test/test-tame-faux-data-properties.js b/packages/ses/test/tame-faux-data-properties.test.js similarity index 100% rename from packages/ses/test/test-tame-faux-data-properties.js rename to packages/ses/test/tame-faux-data-properties.test.js diff --git a/packages/ses/test/test-tame-function-unit.js b/packages/ses/test/tame-function-unit.test.js similarity index 100% rename from packages/ses/test/test-tame-function-unit.js rename to packages/ses/test/tame-function-unit.test.js diff --git a/packages/ses/test/test-tame-harden.js b/packages/ses/test/tame-harden.test.js similarity index 100% rename from packages/ses/test/test-tame-harden.js rename to packages/ses/test/tame-harden.test.js diff --git a/packages/ses/test/test-tame-locale-methods-unsafe.js b/packages/ses/test/tame-locale-methods-unsafe.test.js similarity index 100% rename from packages/ses/test/test-tame-locale-methods-unsafe.js rename to packages/ses/test/tame-locale-methods-unsafe.test.js diff --git a/packages/ses/test/test-tame-locale-methods.js b/packages/ses/test/tame-locale-methods.test.js similarity index 100% rename from packages/ses/test/test-tame-locale-methods.js rename to packages/ses/test/tame-locale-methods.test.js diff --git a/packages/ses/test/test-tame-math-unit.js b/packages/ses/test/tame-math-unit.test.js similarity index 100% rename from packages/ses/test/test-tame-math-unit.js rename to packages/ses/test/tame-math-unit.test.js diff --git a/packages/ses/test/test-tame-math.js b/packages/ses/test/tame-math.test.js similarity index 100% rename from packages/ses/test/test-tame-math.js rename to packages/ses/test/tame-math.test.js diff --git a/packages/ses/test/test-tame-regexp-unit.js b/packages/ses/test/tame-regexp-unit.test.js similarity index 100% rename from packages/ses/test/test-tame-regexp-unit.js rename to packages/ses/test/tame-regexp-unit.test.js diff --git a/packages/ses/test/test-tame-rexexp.js b/packages/ses/test/tame-rexexp.test.js similarity index 100% rename from packages/ses/test/test-tame-rexexp.js rename to packages/ses/test/tame-rexexp.test.js diff --git a/packages/ses/test/test-tame-symbol-constructor.js b/packages/ses/test/tame-symbol-constructor.test.js similarity index 100% rename from packages/ses/test/test-tame-symbol-constructor.js rename to packages/ses/test/tame-symbol-constructor.test.js diff --git a/packages/ses/test/test-tolerate-empty-prototype.js b/packages/ses/test/tolerate-empty-prototype.test.js similarity index 100% rename from packages/ses/test/test-tolerate-empty-prototype.js rename to packages/ses/test/tolerate-empty-prototype.test.js diff --git a/packages/ses/test/test-transforms.js b/packages/ses/test/transforms.test.js similarity index 100% rename from packages/ses/test/test-transforms.js rename to packages/ses/test/transforms.test.js diff --git a/packages/ses/test/test-typeof.js b/packages/ses/test/typeof.test.js similarity index 100% rename from packages/ses/test/test-typeof.js rename to packages/ses/test/typeof.test.js diff --git a/packages/ses/test/test-v8-callsite-properties.js b/packages/ses/test/v8-callsite-properties.test.js similarity index 100% rename from packages/ses/test/test-v8-callsite-properties.js rename to packages/ses/test/v8-callsite-properties.test.js diff --git a/packages/skel/package.json b/packages/skel/package.json index b3f5055b9d..25bf1be82f 100644 --- a/packages/skel/package.json +++ b/packages/skel/package.json @@ -59,7 +59,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" } diff --git a/packages/skel/test/test-index.js b/packages/skel/test/index.test.js similarity index 100% rename from packages/skel/test/test-index.js rename to packages/skel/test/index.test.js diff --git a/packages/static-module-record/package.json b/packages/static-module-record/package.json index 58339c65f9..85857595c2 100644 --- a/packages/static-module-record/package.json +++ b/packages/static-module-record/package.json @@ -73,7 +73,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/static-module-record/test/test-static-module-record.js b/packages/static-module-record/test/static-module-record.test.js similarity index 100% rename from packages/static-module-record/test/test-static-module-record.js rename to packages/static-module-record/test/static-module-record.test.js diff --git a/packages/stream-node/package.json b/packages/stream-node/package.json index 8c6169c56e..85429b899b 100644 --- a/packages/stream-node/package.json +++ b/packages/stream-node/package.json @@ -77,7 +77,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/stream-node/test/test-stream-node.js b/packages/stream-node/test/stream-node.test.js similarity index 100% rename from packages/stream-node/test/test-stream-node.js rename to packages/stream-node/test/stream-node.test.js diff --git a/packages/stream/package.json b/packages/stream/package.json index e3ad17956d..ed18ffede2 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -80,7 +80,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/stream/test/test-map.js b/packages/stream/test/map.test.js similarity index 100% rename from packages/stream/test/test-map.js rename to packages/stream/test/map.test.js diff --git a/packages/stream/test/test-prime.js b/packages/stream/test/prime.test.js similarity index 100% rename from packages/stream/test/test-prime.js rename to packages/stream/test/prime.test.js diff --git a/packages/stream/test/test-pump.js b/packages/stream/test/pump.test.js similarity index 100% rename from packages/stream/test/test-pump.js rename to packages/stream/test/pump.test.js diff --git a/packages/stream/test/test-stream.js b/packages/stream/test/stream.test.js similarity index 100% rename from packages/stream/test/test-stream.js rename to packages/stream/test/stream.test.js diff --git a/packages/syrup/package.json b/packages/syrup/package.json index 32a243c916..d86a133e56 100644 --- a/packages/syrup/package.json +++ b/packages/syrup/package.json @@ -65,7 +65,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/syrup/test/test-decode.js b/packages/syrup/test/decode.test.js similarity index 100% rename from packages/syrup/test/test-decode.js rename to packages/syrup/test/decode.test.js diff --git a/packages/syrup/test/test-encode.js b/packages/syrup/test/encode.test.js similarity index 100% rename from packages/syrup/test/test-encode.js rename to packages/syrup/test/encode.test.js diff --git a/packages/syrup/test/test-fuzz.js b/packages/syrup/test/fuzz.test.js similarity index 100% rename from packages/syrup/test/test-fuzz.js rename to packages/syrup/test/fuzz.test.js diff --git a/packages/where/package.json b/packages/where/package.json index fcfcda43a4..30e8c4e0a0 100644 --- a/packages/where/package.json +++ b/packages/where/package.json @@ -65,7 +65,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/where/test/test-where-endo-cache.js b/packages/where/test/where-endo-cache.test.js similarity index 100% rename from packages/where/test/test-where-endo-cache.js rename to packages/where/test/where-endo-cache.test.js diff --git a/packages/where/test/test-where-endo-ephemeral-state.js b/packages/where/test/where-endo-ephemeral-state.test.js similarity index 100% rename from packages/where/test/test-where-endo-ephemeral-state.js rename to packages/where/test/where-endo-ephemeral-state.test.js diff --git a/packages/where/test/test-where-endo-sock.js b/packages/where/test/where-endo-sock.test.js similarity index 100% rename from packages/where/test/test-where-endo-sock.js rename to packages/where/test/where-endo-sock.test.js diff --git a/packages/where/test/test-where-endo-state.js b/packages/where/test/where-endo-state.test.js similarity index 100% rename from packages/where/test/test-where-endo-state.js rename to packages/where/test/where-endo-state.test.js diff --git a/packages/zip/package.json b/packages/zip/package.json index b89894082b..a81c024174 100644 --- a/packages/zip/package.json +++ b/packages/zip/package.json @@ -66,7 +66,8 @@ }, "ava": { "files": [ - "test/**/test-*.js" + "test/**/test-*.*", + "test/**/*.test.*" ], "timeout": "2m" }, diff --git a/packages/zip/test/test-zip.js b/packages/zip/test/zip.test.js similarity index 100% rename from packages/zip/test/test-zip.js rename to packages/zip/test/zip.test.js diff --git a/scripts/graph.sh b/scripts/graph.sh index ae82ab06b3..645a8520aa 100755 --- a/scripts/graph.sh +++ b/scripts/graph.sh @@ -1,5 +1,9 @@ #!/bin/bash # Generates visualizations of the internal package dependency graph. +# Also generates visualizations of the transitive reduction (tred) of +# that graph, which is the minimal graph with the same *transitive* +# dependencies. Much more legible by itelf. Seeing the two side by side +# often helps to understand the full picture. set -ueo pipefail DIR=$(dirname -- "${BASH_SOURCE[0]}") { @@ -20,12 +24,16 @@ DIR=$(dirname -- "${BASH_SOURCE[0]}") ' echo '}' # normalize -} | dot -Tcanon >packages-graph.dot -dot -Tpng "$DIR"/../packages-graph.png +} | dot -Tcanon > packages-graph.dot +dot -Tpng "$DIR"/../packages-graph.png -dot -Tsvg "$DIR"/../packages-graph.svg +dot -Tsvg "$DIR"/../packages-graph.svg -if acyclic packages-graph.dot | dot -Tcanon >packages-graph-sans-cycles.dot; then +tred packages-graph-tred.dot +dot -Tpng "$DIR"/../packages-graph-tred.png +dot -Tsvg "$DIR"/../packages-graph-tred.svg + +if acyclic packages-graph.dot | dot -Tcanon > packages-graph-sans-cycles.dot; then echo "No cycles in 'dependencies' of packages." else echo "Cycles detected. These lines appear only in the original graph and not the acyclic variant:" diff --git a/scripts/migrate-test-names.mjs b/scripts/migrate-test-names.mjs new file mode 100755 index 0000000000..20077e8f7c --- /dev/null +++ b/scripts/migrate-test-names.mjs @@ -0,0 +1,61 @@ +#!/usr/bin/env zx +/* eslint-disable @jessie.js/safe-await-separator */ +// @ts-nocheck typecheck would require a package.json with zx +/* global chalk, fs, $ -- provided by zx */ + +/** + * Migrate Ava test names from the "test-foo.js" scheme to "foo.test.js" that is the default in Ava. + * + * Motivations + * 1. It aligns with the prevailing use of Ava, the test runner we use and recommand. + * Customizing tool defaults should have a high bar because of the maintenance + * cost they incur. We keep the `files` config explicit for clarity and linter tooling. + * 2. The naming scheme chosen puts "test" at the front of what is obviously a + * test from its path context. To run a particular test from the CLI requires + * typing "test" three time to pick one: yarn test test/test-something.js. + * With Ava's default it would be yarn test test/something.test.js and typing + * the "so" can autocomplete. + */ + +const usage = ` +Run this script in a package to convert its test names and Ava config. + +To run it over all packages, + yarn lerna exec --concurrency 1 --no-bail '../../scripts/migrate-test-names.mjs' +Then for the couple deeper packages + yarn lerna exec --concurrency 1 --no-bail '../../../scripts/migrate-test-names.mjs' + +`; + +const packageObj = fs.readJsonSync('package.json'); +console.log(`${chalk.bold(`Migrating test names: ${packageObj.name}`)}\n`); +console.log(chalk.blue("Updates 'files' glob in package’s Ava config")); +if (packageObj.ava) { + // For now allow both the old and new globs + packageObj.ava.files = ['test/**/test-*.*', 'test/**/*.test.*']; +} +fs.writeJsonSync('package.json', packageObj, { spaces: 2 }); + +console.log(chalk.blue('Moving test files')); +const { stdout: testFiles } = await $`find test -name 'test-*.*' || true`; +const filenames = testFiles.split('\n').filter(Boolean); + +if (filenames.length === 0) { + console.log(chalk.red('No test files found.')); + console.log('Maybe the migration is already done. To roll back:'); + console.log(' git reset . && git checkout . && git clean -f'); +} + +for (const oldname of filenames) { + const newname = oldname + .replace('test-', '') + .replace('.js', '.test.js') + .replace('.ts', '.test.ts'); + await $`git mv ${oldname} ${newname}`; +} + +console.log(chalk.blue('Committing changes')); +await $`git add .`; +await $`git commit -m "chore: test glob to Ava default"`; + +console.log('✅');