Skip to content

Commit

Permalink
test: increase coverage for internal/module.js
Browse files Browse the repository at this point in the history
PR-URL: nodejs#13673
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
TamasHodi authored and jasnell committed Jun 16, 2017
1 parent e74907b commit 83ebb6d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/parallel/test-internal-modules-strip-shebang.js
Original file line number Diff line number Diff line change
@@ -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]));

0 comments on commit 83ebb6d

Please sign in to comment.