summaryrefslogtreecommitdiff
path: root/test/es-module/test-esm-loader-invalid-format.mjs
blob: 75f5de838053940fad939743da928c5a838dff61 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Flags: --experimental-loader ./test/fixtures/es-module-loaders/loader-invalid-format.mjs
import { expectsError, mustCall } from '../common/index.mjs';
import assert from 'assert';

import('../fixtures/es-modules/test-esm-ok.mjs')
.then(assert.fail, expectsError({
  code: 'ERR_INVALID_RETURN_PROPERTY_VALUE',
  message: 'Expected string to be returned for the "format" from the ' +
           '"loader resolve" function but got type undefined.'
}))
.then(mustCall());