Remove annotation to bypass side effect of code coverage
Add test for invalid constructor
MODIFY
shim/src/realmFacade.js
shim/src/realmFacade.js
@@ -3,9 +3,6 @@ import { cleanupSource } from './utilities';
// buildChildRealm is immediately turned into a string, and this function is
// never referenced again, because it closes over the wrong intrinsics
-// todo: This function is stringified and evaluated outside of the primal
-// realms and it currently can't contain code coverage metrics.
-/* istanbul ignore file */
export function buildChildRealm(unsafeRec, BaseRealm) {
const { initRootRealm, initCompartment, getRealmGlobal, realmEvaluate } = BaseRealm;

ADD
shim/test/module/realm.js
+import test from 'tape';
+import Realm from '../../src/realm';
+
+test('new Realm', t => {
+ t.plan(1);
+
+ t.throws(() => new Realm(), TypeError, 'new Real() should throws');
+});

Remove annotation to bypass side effect of code coverage
Add test for invalid constructor