Browse Source

test: increase coverage for internal/module.js

PR-URL: https://github.com/nodejs/node/pull/13673
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
Tamás Hódi 7 years ago
committed by James M Snell
parent
commit
83ebb6d898
  1. 14
      test/parallel/test-internal-modules-strip-shebang.js

14
test/parallel/test-internal-modules-strip-shebang.js

@ -0,0 +1,14 @@
// Flags: --expose-internals
'use strict';
require('../common');
const assert = require('assert');
const stripShebang = require('internal/module').stripShebang;
[
['', ''],
['aa', 'aa'],
['#!', ''],
['#!bin/bash', ''],
['#!bin/bash\naa', '\naa'],
].forEach((i) => assert.strictEqual(stripShebang(i[0]), i[1]));
Loading…
Cancel
Save