diff --git a/packages/vat-data/package.json b/packages/vat-data/package.json index b824afca2562..3ba8f281db12 100644 --- a/packages/vat-data/package.json +++ b/packages/vat-data/package.json @@ -32,6 +32,9 @@ "ava": { "require": [ "@endo/init/debug.js" + ], + "files": [ + "test/**/test-*.js" ] }, "publishConfig": { diff --git a/packages/vat-data/test/prepare-test-env-ava.js b/packages/vat-data/test/prepare-test-env-ava.js new file mode 100644 index 000000000000..718c306fa121 --- /dev/null +++ b/packages/vat-data/test/prepare-test-env-ava.js @@ -0,0 +1,9 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import './prepare-test-env.js'; + +// eslint-disable-next-line import/no-extraneous-dependencies +import { wrapTest } from '@endo/ses-ava'; +import rawTest from 'ava'; + +/** @type {typeof rawTest} */ +export const test = wrapTest(rawTest); diff --git a/packages/vat-data/test/prepare-test-env.js b/packages/vat-data/test/prepare-test-env.js new file mode 100644 index 000000000000..4252aeaea3c1 --- /dev/null +++ b/packages/vat-data/test/prepare-test-env.js @@ -0,0 +1 @@ +import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; diff --git a/packages/vat-data/test/absent.test.js b/packages/vat-data/test/test-absent.js similarity index 100% rename from packages/vat-data/test/absent.test.js rename to packages/vat-data/test/test-absent.js diff --git a/packages/vat-data/test/test-durable-classes.js b/packages/vat-data/test/test-durable-classes.js index 65e06ce45036..b79d35097f09 100644 --- a/packages/vat-data/test/test-durable-classes.js +++ b/packages/vat-data/test/test-durable-classes.js @@ -1,8 +1,8 @@ // Modeled on test-heap-classes.js -import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; +import { test } from './prepare-test-env-ava.js'; -import test from 'ava'; +// eslint-disable-next-line import/order import { M } from '@agoric/store'; import { makeKindHandle, diff --git a/packages/vat-data/test/test-prepare.js b/packages/vat-data/test/test-prepare.js index 15d9274efae5..0ddda5e07a25 100644 --- a/packages/vat-data/test/test-prepare.js +++ b/packages/vat-data/test/test-prepare.js @@ -1,8 +1,8 @@ // Modeled on test-heap-classes.js -import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; +import { test } from './prepare-test-env-ava.js'; -import test from 'ava'; +// eslint-disable-next-line import/order import { M } from '@agoric/store'; import { prepareExoClass, diff --git a/packages/vat-data/test/present.test.js b/packages/vat-data/test/test-present.js similarity index 100% rename from packages/vat-data/test/present.test.js rename to packages/vat-data/test/test-present.js diff --git a/packages/vat-data/test/test-scalar-only-keys.js b/packages/vat-data/test/test-scalar-only-keys.js index 3111a5bb1404..e3cebfaf9410 100644 --- a/packages/vat-data/test/test-scalar-only-keys.js +++ b/packages/vat-data/test/test-scalar-only-keys.js @@ -1,8 +1,8 @@ // From https://github.com/Agoric/agoric-sdk/pull/6903#discussion_r1098067133 -import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; +import { test } from './prepare-test-env-ava.js'; -import test from 'ava'; +// eslint-disable-next-line import/order import { M, makeScalarMapStore } from '@agoric/store'; import { makeScalarBigMapStore } from '../src/vat-data-bindings.js'; diff --git a/packages/vat-data/test/test-virtual-classes.js b/packages/vat-data/test/test-virtual-classes.js index 44d2c12c7159..7a0c0e4d84b5 100644 --- a/packages/vat-data/test/test-virtual-classes.js +++ b/packages/vat-data/test/test-virtual-classes.js @@ -1,8 +1,8 @@ // Modeled on test-heap-classes.js -import '@agoric/swingset-liveslots/tools/prepare-test-env.js'; +import { test } from './prepare-test-env-ava.js'; -import test from 'ava'; +// eslint-disable-next-line import/order import { M } from '@agoric/store'; import { defineVirtualExoClass,