node/test/parallel/test-temporal.js
René 31d7141817
test: run Temporal presence checks without V8 flag
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: https://github.com/nodejs/node/pull/63028
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-05-01 09:10:27 +00:00

12 lines
410 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('assert');
if (!common.hasTemporal) {
common.skip('Temporal is not enabled');
}
// Use globalThis.Temporal to workaround linter complaints.
assert.strictEqual(typeof globalThis.Temporal, 'object');
const pdt = globalThis.Temporal.PlainDateTime.from('1969-07-20T20:17:00');
assert.strictEqual(pdt.toString(), '1969-07-20T20:17:00');