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: #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 addaleax committed Jun 21, 2017
1 parent ba20627 commit 5e59c2d
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 5e59c2d

Please sign in to comment.