From 407de8b8347bae165e60b9ccf0bce8050ba861fa Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 6 Jul 2021 00:36:43 +0800 Subject: fix(runtime): ignored tests should not cause permission changes (#11278) --- runtime/js/40_testing.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js index 3107f70a1..0106f895a 100644 --- a/runtime/js/40_testing.js +++ b/runtime/js/40_testing.js @@ -192,17 +192,16 @@ finishing test case.`; } async function runTest({ ignore, fn, permissions }) { + if (ignore) { + return "ignored"; + } + let token = null; try { if (permissions) { token = pledgeTestPermissions(permissions); } - - if (ignore) { - return "ignored"; - } - await fn(); return "ok"; -- cgit v1.2.3