mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 19:48:12 +00:00

PR-URL: https://github.com/nodejs/node/pull/35415 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
// Copyright 2020 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Minimally stub out methods from JSTest's standalone-pre.js.
|
|
function description(msg) {}
|
|
function debug(msg) {}
|
|
|
|
function shouldBe(_a) {
|
|
print((typeof _a == "function" ? _a() : eval(_a)));
|
|
}
|
|
|
|
function shouldBeTrue(_a) { shouldBe(_a); }
|
|
function shouldBeFalse(_a) { shouldBe(_a); }
|
|
function shouldBeNaN(_a) { shouldBe(_a); }
|
|
function shouldBeNull(_a) { shouldBe(_a); }
|
|
function shouldNotThrow(_a) { shouldBe(_a); }
|
|
function shouldThrow(_a) { shouldBe(_a); }
|
|
|
|
function noInline() {}
|
|
function finishJSTest() {}
|
|
|
|
// Stub out $vm.
|
|
try {
|
|
$vm;
|
|
} catch(e) {
|
|
const handler = {
|
|
get: function(x, prop) {
|
|
if (prop == Symbol.toPrimitive) {
|
|
return function() { return undefined; };
|
|
}
|
|
return dummy;
|
|
},
|
|
};
|
|
const dummy = new Proxy(function() { return dummy; }, handler);
|
|
this.$vm = dummy;
|
|
}
|
|
|
|
// Other functions.
|
|
function ensureArrayStorage() {}
|
|
function transferArrayBuffer() {}
|