From b6a7818465970c513f7b43424aad853ffb4f930c Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Wed, 24 Jul 2019 12:44:51 -0600 Subject: [PATCH] ses-test: reenable indirect eval --- package-lock.json | 18 +++++++++++++----- package.json | 2 +- test/ses-test.js | 35 +++++++++-------------------------- 3 files changed, 23 insertions(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index e8ac37801d0..5f48e2161c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1706,13 +1706,21 @@ "dev": true }, "ses": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/ses/-/ses-0.5.1.tgz", - "integrity": "sha512-lcifZRRsDBFxnQLsrDufl8/Xd5qcaPEOamVtKmLl898rYjTQRUh+V41hC3Y6B4XFOYFD7ESYtTtit+Ky2cVMTg==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/ses/-/ses-0.5.3.tgz", + "integrity": "sha512-SoDPdw0XeWgQ7ghM1YrU4GT1u4slTnjvhus+LoT6oAq8y5/kJLTA1oBk2g12/wEwGEWFooMOoYZqUqUh9bFa7Q==", "dev": true, "requires": { - "@agoric/make-hardener": "^0.0.4", - "esm": "^3.2.5" + "@agoric/make-hardener": "^0.0.6", + "esm": "^3.2.25" + }, + "dependencies": { + "@agoric/make-hardener": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@agoric/make-hardener/-/make-hardener-0.0.6.tgz", + "integrity": "sha512-OpZcNx/7bhHar0iuQ6D+FKYCMMxqKvYs4aC/bB5v/ffZaSM5sNAl98DnGL1mD9NSyZLGzAZ7D5XwJpe37BMldQ==", + "dev": true + } } }, "shebang-command": { diff --git a/package.json b/package.json index ba2a65ce88d..6917598031c 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "prettier": "^1.16.4", "rollup": "^1.16.6", "rollup-plugin-node-resolve": "^5.2.0", - "ses": "^0.5.1", + "ses": "^0.5.3", "tap-spec": "^5.0.0", "tape": "^4.9.2", "tape-promise": "^4.0.0" diff --git a/test/ses-test.js b/test/ses-test.js index f148f058faf..93071979353 100644 --- a/test/ses-test.js +++ b/test/ses-test.js @@ -34,10 +34,7 @@ test('infix bang is disabled by default', t => { SyntaxError, `infix bang fails`, ); - if (false) { - // FIXME: (1 , eval) is not a function. - t.equals(s.evaluate('(1,eval)("123")'), 123, `indirect eval works`); - } + t.equals(s.evaluate('(1,eval)("123")'), 123, `indirect eval works`); } catch (e) { t.assert(false, e); } finally { @@ -154,29 +151,15 @@ test('infix bang can be enabled', async t => { ), ); - let indirEval = noReject; - if (true) { - // FIXME: Should be noReject. - indirEval = fn => - t.rejects( - fn(), - /\(1 , eval\) is not a function/, - `${name} indirect eval fails (FIXME)`, - ); - } - await indirEval(async () => - t.equals( - await s.evaluate(`(1,eval)('"abc"!length')`), - 3, - `${name} indirect eval works`, - ), + t.equals( + await s.evaluate(`(1,eval)('"abc"!length')`), + 3, + `${name} indirect eval works`, ); - await indirEval(async () => - t.equals( - await s.evaluate(`(1,eval)('(1,eval)(\\'"abc"!length\\')')`), - 3, - `${name} nested indirect eval works`, - ), + t.equals( + await s.evaluate(`(1,eval)('(1,eval)(\\'"abc"!length\\')')`), + 3, + `${name} nested indirect eval works`, ); } } catch (e) {