make sure Realm can be imported, basic smoke test
MODIFY
package.json
package.json
"description": "Secure EcmaScript",
"main": "index.js",
"scripts": {
- "test": "node test/test.js"
+ "test": "tape test/**/*.js"
},
"devDependencies": {
"esm": "^3.0.37",

MODIFY
test/test.js
test/test.js
-function test() {
- return 1;
-}
+var test = require('tape');
+var Realm = require('../proposal-realms/shim/src/realm.js').default;
-test();
+test('hello', function(t) {
+ t.plan(2); // need t.plan or t.end, but both is ok too
+ t.equal(1, 1);
+ t.equal(1+1, 2);
+ t.end();
+});
+test('load', function(t) {
+ const r = new Realm();
+ let o = r.evaluate('123+4');
+ t.equal(o, 127);
+ t.end();
+});

make sure Realm can be imported, basic smoke test