summaryrefslogtreecommitdiff
path: root/test/spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec.js')
-rw-r--r--test/spec.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/spec.js b/test/spec.js
index 68e56332..2b1f9b33 100644
--- a/test/spec.js
+++ b/test/spec.js
@@ -14,9 +14,19 @@
* limitations under the License.
*/
-/* polyfill from SM to D8 */
+/* polyfill from SM/CH to D8 */
if (typeof arguments == 'undefined') {
- arguments = scriptArgs;
+ if (typeof scriptArgs != 'undefined') {
+ arguments = scriptArgs;
+ } else if(typeof WScript != 'undefined') {
+ arguments = WScript.Arguments || [];
+ }
+}
+
+if (typeof quit == 'undefined') {
+ if (typeof WScript != 'undefined') {
+ quit = WScript.quit;
+ }
}
if (typeof readbuffer == 'undefined') {