0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-directory-import.js
2020-05-15 19:08:39 -07:00

15 lines
333 B
JavaScript

'use strict';
require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');
const { pathToFileURL } = require('url');
{
assert.rejects(import('./'), /ERR_UNSUPPORTED_DIR_IMPORT/);
assert.rejects(
import(pathToFileURL(fixtures.path('packages', 'main'))),
/Did you mean/,
);
}