diff --git a/lib/internal/modules/esm/assert.js b/lib/internal/modules/esm/assert.js index eed80313d463f2..2f11890b0e6af1 100644 --- a/lib/internal/modules/esm/assert.js +++ b/lib/internal/modules/esm/assert.js @@ -2,6 +2,7 @@ const { ArrayPrototypeFilter, + ArrayPrototypeFlat, ArrayPrototypeIncludes, ObjectKeys, ObjectPrototypeHasOwnProperty, @@ -39,7 +40,7 @@ const formatTypeMap = { * @type {Array} */ const supportedAssertionTypes = ArrayPrototypeFilter( - ObjectValues(formatTypeMap), + ArrayPrototypeFlat(ObjectValues(formatTypeMap)), (type) => type !== kImplicitAssertType); diff --git a/test/es-module/test-import-jsonc.js b/test/es-module/test-import-jsonc.js index 02db56c6b93b99..bd3a0c0c0b2786 100644 --- a/test/es-module/test-import-jsonc.js +++ b/test/es-module/test-import-jsonc.js @@ -1,6 +1,6 @@ 'use strict'; -const common = require('../common'); +require('../common'); const assert = require('assert'); const jsonFiles = [ @@ -19,4 +19,4 @@ for (const [file, [throwWithTypeJSON, throwWithTypeJSONC]] of jsonFiles) { assert[throwWithTypeJSONC ? 'rejects' : 'doesNotReject'](async () => { await import(file, { with: { type: 'jsonc' } }); }); -} \ No newline at end of file +}