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 <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
This commit is contained in:
Nicolò Ribaudo authored and Richard Lau committed 2024-03-22 16:02:40 +00:00
1 parent 812b126dd9
commit 931d02fe3e
6 files changed
+10 -4

No files matched your search

@@ -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());
@@ -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();
@@ -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());
@@ -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();
@@ -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; }