Skip to content

Commit

Permalink
fix(bundle-source): tests use install-ses
Browse files Browse the repository at this point in the history
The bundle-source unit tests now create a SES environment with
`@agoric/install-ses`, rather than using `@agoric/evaluate`. This should not
affect downstream uses.
  • Loading branch information
warner committed Jun 26, 2020
1 parent 0f230e7 commit f793424
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/bundle-source/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
"main": "src/index.js",
"scripts": {
"build": "exit 0",
"test": "tape -r esm 'test/**/*.js'",
"test": "tap --no-coverage --jobs=1 'test/**/*.js'",
"lint-fix": "eslint --fix '**/*.js'",
"lint-check": "eslint '**/*.js'",
"lint-fix-jessie": "eslint -c '.eslintrc-jessie.js' --fix '**/*.js'",
"lint-check-jessie": "eslint -c '.eslintrc-jessie.js' '**/*.js'"
},
"devDependencies": {
"tap-spec": "^5.0.0",
"@agoric/install-ses": "0.1.0",
"tap": "^14.10.5",
"tape": "^4.11.0",
"tape-promise": "^4.0.0"
},
"dependencies": {
"@agoric/acorn-eventual-send": "^2.0.5",
"@agoric/babel-parser": "^7.6.4",
"@agoric/evaluate": "^2.2.6",
"@agoric/harden": "^0.0.8",
"@agoric/transform-eventual-send": "^1.3.0",
"@babel/generator": "^7.6.4",
Expand Down
8 changes: 7 additions & 1 deletion packages/bundle-source/test/circular.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/* global Compartment */
import '@agoric/install-ses';
import { test } from 'tape-promise/tape';
import { evaluateProgram as evaluate } from '@agoric/evaluate';
import bundleSource from '..';

function evaluate(src, endowments) {
const c = new Compartment(endowments, {}, {});
return c.evaluate(src);
}

test('circular export', async t => {
try {
const { source: src1 } = await bundleSource(
Expand Down
8 changes: 7 additions & 1 deletion packages/bundle-source/test/sanity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/* global Compartment */
import '@agoric/install-ses';
import { test } from 'tape-promise/tape';
import { evaluateProgram as evaluate } from '@agoric/evaluate';
import bundleSource from '..';

function evaluate(src, endowments) {
const c = new Compartment(endowments, {}, {});
return c.evaluate(src);
}

test('nestedEvaluate', async t => {
try {
const {
Expand Down

0 comments on commit f793424

Please sign in to comment.