summaryrefslogtreecommitdiff
path: root/test/es-module/test-esm-loader-invalid-format.mjs
blob: e4e4e30f5cc2e84f32a0cadccf79ebdc1e509ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Flags: --experimental-modules --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());