Skip to content

Rewire on node module with shebang doesn't work. #206

@MattisLind

Description

@MattisLind

It works to require a module with a shebang. But rewire doesn't handle it well.

(function (exports, require, module, __filename, __dirname) { var clearInterval = global.clearInterval; var clearTimeout = global.clearTimeout; var setInterval = global.setInterval; var setTimeout = global.setTimeout; var queueMicrotask = global.queueMicrotask; var clearImmediate = global.clearImmediate; var setImmediate = global.setImmediate; var before = global.before; var after = global.after; var beforeEach = global.beforeEach; var afterEach = global.afterEach; var run = global.run; var context = global.context; var describe = global.describe; var xcontext = global.xcontext; var xdescribe = global.xdescribe; var specify = global.specify; var it = global.it; var xspecify = global.xspecify; var xit = global.xit; (function () { #!/usr/bin/node
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^

SyntaxError: Invalid or unexpected token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions