Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MattisLind opened this issue Oct 6, 2022 · 0 comments
Open

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

MattisLind opened this issue Oct 6, 2022 · 0 comments

Comments

@MattisLind
Copy link

MattisLind commented Oct 6, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant