1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --allow-natives-syntax --harmony-import-assertions
6
7var result1;
8var result2;
9import('modules-skip-1.json', { get assert() { throw 'bad \'assert\' getter!'; } }).then(
10    () => assertUnreachable('Should have failed due to throwing getter'),
11    error => result1 = error);
12import('modules-skip-1.json', { assert: { get assertionKey() { throw 'bad \'assertionKey\' getter!'; } } }).then(
13    () => assertUnreachable('Should have failed due to throwing getter'),
14    error => result2 = error);
15
16%PerformMicrotaskCheckpoint();
17
18assertEquals('bad \'assert\' getter!', result1);
19assertEquals('bad \'assertionKey\' getter!', result2);