Skip to content

Commit

Permalink
Update test for ShadowRealm (nee Realms) proposal
Browse files Browse the repository at this point in the history
ShadowRealm is the new name for the old Realms proposal [1][2], and the API is
simplified; I adjusted the test code accordingly.

[1] https://github.com/tc39/proposal-shadowrealm (note that the old URI redirects here, too)
[2] Renaming discussion here: tc39/proposal-shadowrealm#321
  • Loading branch information
jjgriego authored and ljharb committed Oct 19, 2022
1 parent 45d0e7c commit d21e070
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions data-esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ exports.tests = [
],
},
{
name: 'Realms',
name: 'ShadowRealm',
category: STAGE3,
significance: 'large',
spec: 'https://github.com/tc39/proposal-realms',
spec: 'https://github.com/tc39/proposal-shadowrealm',
exec: function () {/*
return typeof Realm === "function"
&& ["eval", "global", "intrinsics", "stdlib", "directEval", "indirectEval", "initGlobal", "nonEval"].every(function(key){
return key in Realm.prototype;
return typeof ShadowRealm === "function"
&& ["evaluate", "importValue"].every(function(key){
return key in ShadowRealm.prototype;
});
*/},
res: {
Expand Down
10 changes: 5 additions & 5 deletions esnext/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@
<!-- TABLE BODY -->
<tr class="category"><td colspan="164"><span>Stage 3</span></td>
</tr>
<tr significance="1"><td id="test-Realms"><span><a class="anchor" href="#test-Realms">&#xA7;</a><a href="https://github.com/tc39/proposal-realms">Realms</a></span><script data-source="
return typeof Realm === &quot;function&quot;
&amp;&amp; [&quot;eval&quot;, &quot;global&quot;, &quot;intrinsics&quot;, &quot;stdlib&quot;, &quot;directEval&quot;, &quot;indirectEval&quot;, &quot;initGlobal&quot;, &quot;nonEval&quot;].every(function(key){
return key in Realm.prototype;
<tr significance="1"><td id="test-ShadowRealm"><span><a class="anchor" href="#test-ShadowRealm">&#xA7;</a><a href="https://github.com/tc39/proposal-shadowrealm">ShadowRealm</a></span><script data-source="
return typeof ShadowRealm === &quot;function&quot;
&amp;&amp; [&quot;evaluate&quot;, &quot;importValue&quot;].every(function(key){
return key in ShadowRealm.prototype;
});
">test(function(){try{var asyncTestPassed=global.__asyncPassedFn && __asyncPassedFn("0");try{return Function("asyncTestPassed","\nreturn typeof Realm === \"function\"\n && [\"eval\", \"global\", \"intrinsics\", \"stdlib\", \"directEval\", \"indirectEval\", \"initGlobal\", \"nonEval\"].every(function(key){\n return key in Realm.prototype;\n });\n ")(asyncTestPassed)}catch(e){asyncTestPassed=global.__strictAsyncPassedFn && __strictAsyncPassedFn("0");return Function("asyncTestPassed","'use strict';"+"\nreturn typeof Realm === \"function\"\n && [\"eval\", \"global\", \"intrinsics\", \"stdlib\", \"directEval\", \"indirectEval\", \"initGlobal\", \"nonEval\"].every(function(key){\n return key in Realm.prototype;\n });\n ")(asyncTestPassed)&&"Strict"}}catch(e){return false;}}());
">test(function(){try{var asyncTestPassed=global.__asyncPassedFn && __asyncPassedFn("0");try{return Function("asyncTestPassed","\nreturn typeof ShadowRealm === \"function\"\n && [\"evaluate\", \"importValue\"].every(function(key){\n return key in ShadowRealm.prototype;\n });\n ")(asyncTestPassed)}catch(e){asyncTestPassed=global.__strictAsyncPassedFn && __strictAsyncPassedFn("0");return Function("asyncTestPassed","'use strict';"+"\nreturn typeof ShadowRealm === \"function\"\n && [\"evaluate\", \"importValue\"].every(function(key){\n return key in ShadowRealm.prototype;\n });\n ")(asyncTestPassed)&&"Strict"}}catch(e){return false;}}());
</script></td>
<td class="unknown obsolete" data-browser="tr">?</td>
<td class="unknown obsolete" data-browser="babel6corejs2">?</td>
Expand Down

0 comments on commit d21e070

Please sign in to comment.