Having Problems With ses-ava
#1595
-
Problem DescriptionI've been trying to write some import { test } from '@agoric/swingset-vat/tools/prepare-test-env-ava.js';
test('initial', async t => {
t.pass('This is a dummy test');
}) Here's the error message I get:
When I copy/paste the contents of prepare-test-env-ava.js to my test file directly like below I get a different error message; Test File import '@endo/init/pre-bundle-source.js';
import '@agoric/swingset-vat/tools/prepare-test-env.js';
import '@endo/ses-ava/exported.js';
import { wrapTest } from '@endo/ses-ava';
import rawTest from 'ava';
export const test = wrapTest(rawTest);
export const VatData = globalThis.VatData;
assert(VatData);
test('initial', async t => {
t.pass('This is a dummy test');
}) Error Message
When I comment out the line that imports Test file import '@agoric/swingset-vat/tools/prepare-test-env.js';
import '@endo/ses-ava/exported.js';
// import { wrapTest } from '@endo/ses-ava';
import rawTest from 'ava';
export const test = rawTest;
export const VatData = globalThis.VatData;
assert(VatData);
test('initial', async t => {
t.pass('This is a dummy test');
}) Above test passes. I'm able to make test-coveredCall-service-upgrade.js work so I'm guessing the issue is related to my project setup. To replicate the import '@agoric/swingset-vat/tools/prepare-test-env.js';
import test from 'ava'; cc @dckc Possibly Related Issues/PRs |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @anilhelvaci; thanks for sharing your experience... it's not obvious to me what's going on. @kriskowal here's hoping for a moment to ask you about this |
Beta Was this translation helpful? Give feedback.
-
I’m equally perplexed but also not surprised. The Cannot redefine toString suggests that the object in question is frozen, but which object is a mystery. It doesn’t look to me like I agree your isolation suggests that there is a problem in Please let me know if you find a useful clue in my wild speculation. |
Beta Was this translation helpful? Give feedback.
-
For those who run into this issue; this turned out to be the cause for me => avajs/ava#2946 (comment) |
Beta Was this translation helpful? Give feedback.
For those who run into this issue; this turned out to be the cause for me => avajs/ava#2946 (comment)