xref: /third_party/node/test/js-native-api/test_constructor/test_null.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/js-native-api/test_constructor/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../../common');
31cb0ef41Sopenharmony_ciconst assert = require('assert');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci// Test passing NULL to object-related N-APIs.
61cb0ef41Sopenharmony_ciconst { testNull } = require(`./build/${common.buildType}/test_constructor`);
71cb0ef41Sopenharmony_ciconst expectedResult = {
81cb0ef41Sopenharmony_ci  envIsNull: 'Invalid argument',
91cb0ef41Sopenharmony_ci  nameIsNull: 'Invalid argument',
101cb0ef41Sopenharmony_ci  lengthIsZero: 'napi_ok',
111cb0ef41Sopenharmony_ci  nativeSideIsNull: 'Invalid argument',
121cb0ef41Sopenharmony_ci  dataIsNull: 'napi_ok',
131cb0ef41Sopenharmony_ci  propsLengthIsZero: 'napi_ok',
141cb0ef41Sopenharmony_ci  propsIsNull: 'Invalid argument',
151cb0ef41Sopenharmony_ci  resultIsNull: 'Invalid argument',
161cb0ef41Sopenharmony_ci};
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ciassert.deepStrictEqual(testNull.testDefineClass(), expectedResult);
19

Indexes created Thu Nov 07 10:32:03 CST 2024