| Index: test/cctest/test-api.cc
|
| diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
|
| index 9e9e03a937910963966f923e4bad19aa7d30c2ce..a63ad9390ef58b0aad88ce081a87c0d85ebcc69f 100644
|
| --- a/test/cctest/test-api.cc
|
| +++ b/test/cctest/test-api.cc
|
| @@ -21101,3 +21101,21 @@ TEST(StrongModeArityCallFromApi2) {
|
| CHECK(!try_catch.HasCaught());
|
| }
|
| }
|
| +
|
| +
|
| +TEST(ExtrasExportsObject) {
|
| + v8::Isolate* isolate = CcTest::isolate();
|
| + v8::HandleScope handle_scope(isolate);
|
| + LocalContext env;
|
| +
|
| + // standalone.gypi ensures we include the test-extra.js file, which should
|
| + // add the testExtraShouldReturnFive export
|
| + v8::Local<v8::Object> exports = env->GetExtrasExportsObject();
|
| +
|
| + auto func =
|
| + exports->Get(v8_str("testExtraShouldReturnFive")).As<v8::Function>();
|
| + auto undefined = v8::Undefined(isolate);
|
| + auto result = func->Call(undefined, 0, {}).As<v8::Number>();
|
| +
|
| + CHECK(result->Value() == 5.0);
|
| +}
|
|
|