From 931d02fe3e7227a33776326283fccc6a3dca28a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Thu, 21 Mar 2024 22:01:44 +0100 Subject: [PATCH] test, v8: fix wrong import attributes test PR-URL: https://github.com/nodejs/node/pull/52184 Refs: https://github.com/nodejs/node/pull/51136 Refs: https://github.com/nodejs/node/pull/52165#issuecomment-2013308581 Reviewed-By: Richard Lau Reviewed-By: Marco Ippolito Reviewed-By: Geoffrey Booth --- .../v8/test/mjsunit/harmony/modules-import-assertions-3.mjs | 2 +- .../mjsunit/harmony/modules-import-assertions-dynamic-5.mjs | 2 +- .../v8/test/mjsunit/harmony/modules-import-attributes-3.mjs | 2 +- .../mjsunit/harmony/modules-import-attributes-dynamic-5.mjs | 2 +- ...ts-json-1.mjs => modules-skip-imports-json-assert-1.mjs} | 0 .../mjsunit/harmony/modules-skip-imports-json-with-1.mjs | 6 ++++++ 6 files changed, 10 insertions(+), 4 deletions(-) rename deps/v8/test/mjsunit/harmony/{modules-skip-imports-json-1.mjs => modules-skip-imports-json-assert-1.mjs} (100%) create mode 100644 deps/v8/test/mjsunit/harmony/modules-skip-imports-json-with-1.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-import-assertions-3.mjs b/deps/v8/test/mjsunit/harmony/modules-import-assertions-3.mjs index 9a648fcc6e62de..b4e7627ac8ff2c 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-assertions-3.mjs +++ b/deps/v8/test/mjsunit/harmony/modules-import-assertions-3.mjs @@ -4,6 +4,6 @@ // Flags: --harmony-import-assertions -import {life} from 'modules-skip-imports-json-1.mjs'; +import {life} from 'modules-skip-imports-json-assert-1.mjs'; assertEquals(42, life()); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-assertions-dynamic-5.mjs b/deps/v8/test/mjsunit/harmony/modules-import-assertions-dynamic-5.mjs index 2019cfd12ab103..f79aaef7968de7 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-assertions-dynamic-5.mjs +++ b/deps/v8/test/mjsunit/harmony/modules-import-assertions-dynamic-5.mjs @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax --harmony-import-assertions var life; -import('modules-skip-imports-json-1.mjs',).then(namespace => life = namespace.life()); +import('modules-skip-imports-json-assert-1.mjs',).then(namespace => life = namespace.life()); %PerformMicrotaskCheckpoint(); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-attributes-3.mjs b/deps/v8/test/mjsunit/harmony/modules-import-attributes-3.mjs index 34db1852367c19..2a726d53d65008 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-attributes-3.mjs +++ b/deps/v8/test/mjsunit/harmony/modules-import-attributes-3.mjs @@ -4,6 +4,6 @@ // Flags: --harmony-import-attributes -import {life} from 'modules-skip-imports-json-1.mjs'; +import {life} from 'modules-skip-imports-json-with-1.mjs'; assertEquals(42, life()); diff --git a/deps/v8/test/mjsunit/harmony/modules-import-attributes-dynamic-5.mjs b/deps/v8/test/mjsunit/harmony/modules-import-attributes-dynamic-5.mjs index cdb1567c330764..9f0a24e8de294f 100644 --- a/deps/v8/test/mjsunit/harmony/modules-import-attributes-dynamic-5.mjs +++ b/deps/v8/test/mjsunit/harmony/modules-import-attributes-dynamic-5.mjs @@ -5,7 +5,7 @@ // Flags: --allow-natives-syntax --harmony-import-attributes var life; -import('modules-skip-imports-json-1.mjs',).then(namespace => life = namespace.life()); +import('modules-skip-imports-json-with-1.mjs',).then(namespace => life = namespace.life()); %PerformMicrotaskCheckpoint(); diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-imports-json-1.mjs b/deps/v8/test/mjsunit/harmony/modules-skip-imports-json-assert-1.mjs similarity index 100% rename from deps/v8/test/mjsunit/harmony/modules-skip-imports-json-1.mjs rename to deps/v8/test/mjsunit/harmony/modules-skip-imports-json-assert-1.mjs diff --git a/deps/v8/test/mjsunit/harmony/modules-skip-imports-json-with-1.mjs b/deps/v8/test/mjsunit/harmony/modules-skip-imports-json-with-1.mjs new file mode 100644 index 00000000000000..6681d0421636c5 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/modules-skip-imports-json-with-1.mjs @@ -0,0 +1,6 @@ +// Copyright 2021 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import json from "modules-skip-1.json" with { type: "json" }; +export function life() { return json.life; }