diff --git a/test/staging/explicit-resource-management/await-using-in-top-level-module.js b/test/staging/explicit-resource-management/await-using-in-top-level-module.js new file mode 100644 index 0000000000..18c2bfc50e --- /dev/null +++ b/test/staging/explicit-resource-management/await-using-in-top-level-module.js @@ -0,0 +1,14 @@ +// Copyright (C) 2025 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: await using should be allowed in top-level module. +flags: [module] +features: [explicit-resource-management] +---*/ + +await using x = { + [Symbol.asyncDispose]() { + return 42; + }, +};