Skip to content

Commit 11a232e

Browse files
committed
test: add basic temporal presence check
1 parent 804c425 commit 11a232e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/parallel/test-temporal.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Flags: --harmony-temporal
2+
3+
'use strict';
4+
const common = require('../common');
5+
const assert = require('assert');
6+
7+
if (!process.config.variables.v8_enable_temporal_support) {
8+
common.skip('Temporal is not enabled');
9+
}
10+
11+
// Use globalThis.Temporal to workaround linter complaints.
12+
assert.strictEqual(typeof globalThis.Temporal, 'object');
13+
const instant = globalThis.Temporal.Instant.from('1969-07-20T20:17Z');
14+
assert.strictEqual(instant.toString(), '1969-07-20T20:17:00Z');

0 commit comments

Comments
 (0)