Skip to content

Commit

Permalink
test, v8: fix wrong import attributes test
Browse files Browse the repository at this point in the history
PR-URL: #52184
Refs: #51136
Refs: #52165 (comment)
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
  • Loading branch information
nicolo-ribaudo authored and richardlau committed Mar 22, 2024
1 parent 812b126 commit 931d02f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
@@ -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; }

0 comments on commit 931d02f

Please sign in to comment.