node/test/fixtures/node_modules/pkgexports-sugar/main.js

11 lines
233 B
JavaScript

const assert = require('assert');
module.exports = 'main';
// Test self-resolve
require('@exports/sugar');
// Test self-resolve dynamic import
import('@exports/sugar').then(impt => {
assert.strictEqual(impt.default, 'main');
});