Skip to content

Commit

Permalink
refactor(vat-data): use own prepare-test-env-ava.js
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Aug 28, 2023
1 parent 2ffcef2 commit 0c1730a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 8 deletions.
3 changes: 3 additions & 0 deletions packages/vat-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
"ava": {
"require": [
"@endo/init/debug.js"
],
"files": [
"test/**/test-*.js"
]
},
"publishConfig": {
Expand Down
9 changes: 9 additions & 0 deletions packages/vat-data/test/prepare-test-env-ava.js
Original file line number Diff line number Diff line change
@@ -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);
1 change: 1 addition & 0 deletions packages/vat-data/test/prepare-test-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@agoric/swingset-liveslots/tools/prepare-test-env.js';
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/vat-data/test/test-durable-classes.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/vat-data/test/test-prepare.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions packages/vat-data/test/test-scalar-only-keys.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions packages/vat-data/test/test-virtual-classes.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 0c1730a

Please sign in to comment.