提交 8166b623 编写于 作者: Y yaochaonan

Signed-off-by: yaochaonan <yaochaonan@huawei.com>

Change-Id: Ie9554e78638a9c2ecdd0cc74d1502f1c10fd2841

Change-Id: I4956e84dbc36aaceb4e886b5d267d1a2ad6eb191
上级 8dad072b
......@@ -1968,10 +1968,10 @@ static napi_value napiDefineClass(napi_env env, napi_callback_info info)
static napi_value napiRunScriptPath(napi_env env, napi_callback_info info)
{
napi_value value;
const char* path = "index/page";
const char* path = "pages/index.ets";
napi_status status = napi_run_script_path(env, path, &value);
NAPI_ASSERT(env, status == napi_ok, "napi_run_script_path ok");
NAPI_ASSERT(env, value == nullptr, "napi_run_script_path fail");
NAPI_ASSERT(env, value != nullptr, "napi_run_script_path success");
napi_value _value;
NAPI_CALL(env, napi_create_int32(env, 0, &_value));
......
......@@ -124,6 +124,19 @@ export default function nativeApiStringJsunit() {
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0007
* @tc.name napiRunScriptPath007
* @tc.desc aceNapiEtsTest
*/
it('napiRunScriptPath007', 0, async function (done) {
console.info('napiRunScriptPath START');
value = napitest.napiRunScriptPath();
console.info('napiRunScriptPath testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0008
* @tc.name napiCallThreadsafeFunction008
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册