MCPcopy Index your code
hub / github.com/nodejs/node-addon-api / test

Function test

test/date.js:7–20  ·  view source on GitHub ↗
(binding)

Source from the content-addressed store, hash-verified

5module.exports = require('./common').runTest(test);
6
7function test (binding) {
8 const {
9 CreateDate,
10 IsDate,
11 ValueOf,
12 OperatorValue,
13 CreateDateFromTimePoint
14 } = binding.date;
15 assert.deepStrictEqual(CreateDate(0), new Date(0));
16 assert.deepStrictEqual(CreateDateFromTimePoint(), new Date(0));
17 assert.strictEqual(IsDate(new Date(0)), true);
18 assert.strictEqual(ValueOf(new Date(42)), 42);
19 assert.strictEqual(OperatorValue(new Date(42)), true);
20}

Callers

nothing calls this directly

Calls 5

CreateDateFunction · 0.85
CreateDateFromTimePointFunction · 0.85
IsDateFunction · 0.85
ValueOfFunction · 0.85
OperatorValueFunction · 0.85

Tested by

no test coverage detected