diff --git a/core/runtime/setup.rs b/core/runtime/setup.rs index 17ac8398a..de3a68a9a 100644 --- a/core/runtime/setup.rs +++ b/core/runtime/setup.rs @@ -23,13 +23,10 @@ fn v8_init( let base_flags = concat!( " --wasm-test-streaming", - " --harmony-import-assertions", - " --harmony-import-attributes", " --no-validate-asm", " --turbo_fast_api_calls", - " --harmony-array-from_async", - " --harmony-iterator-helpers", " --harmony-temporal", + " --js-float16array", ); let snapshot_flags = "--predictable --random-seed=42"; let expose_natives_flags = "--expose_gc --allow_natives_syntax"; diff --git a/testing/unit/tc39_test.ts b/testing/unit/tc39_test.ts index 841c81dfe..7d59ca2e8 100644 --- a/testing/unit/tc39_test.ts +++ b/testing/unit/tc39_test.ts @@ -39,8 +39,28 @@ test(function testIteratorHelpers() { } }); -// Verify that the "Temporal" proposal is enabled -test(function testTemporalEnabled() { +// Verify that "Set methods" proposal is enabled (https://github.com/tc39/proposal-set-methods) +test(function testSetMethods() { + // @ts-expect-error: Not available in TypeScript yet + const a: Set = new Set([1, 2, 3]).intersection(new Set([3, 4, 5])); + if (a.size !== 1 && !a.has(3)) { + fail("failed"); + } +}); + +// Verify that the "Temporal" proposal is enabled (https://github.com/tc39/proposal-temporal) +test(function testTemporal() { // @ts-expect-error: Not available in TypeScript yet assert(typeof Temporal !== "undefined"); }); + +// Verify that the "Float16Array" proposal is enabled (https://github.com/tc39/proposal-float16array) +test(function testFloat16Array() { + // @ts-expect-error: Not available in TypeScript yet + const a = new Float16Array([Math.PI]); + assert(a[0] === 3.140625); + // @ts-expect-error: Not available in TypeScript yet + assert(typeof DataView.prototype.getFloat16 !== "undefined"); + // @ts-expect-error: Not available in TypeScript yet + assert(typeof DataView.prototype.setFloat16 !== "undefined"); +});