File: main.js

package info (click to toggle)
node-rollup-plugin-commonjs 25.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,304 kB
  • sloc: javascript: 6,824; makefile: 6
file content (9 lines) | stat: -rwxr-xr-x 310 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
/* eslint-disable import/no-dynamic-require, global-require */

function takeModule(withName) {
  return require(withName);
}

t.is(takeModule('./dep1.js'), 'dep');
// The bundled code will run from test/helpers/util.js
t.is(takeModule('../fixtures/function/dynamic-require-targets-fallback/dep2.js'), 'dep');