1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Made stack patch test less brittle.

This commit is contained in:
Alex Gorbatchev 2013-06-13 13:50:05 -07:00
parent eb0a222eea
commit 3785996c44
2 changed files with 2 additions and 2 deletions

View file

@ -100,7 +100,7 @@ exports.run = (code, options = {}) ->
# Compile.
if not helpers.isCoffee(mainModule.filename) or require.extensions
answer = compile code, options
code = answer.js? and answer.js or answer
code = answer.js ? answer
mainModule._compile code, mainModule.filename

View file

@ -45,7 +45,7 @@ test "compiler error formatting", ->
test "patchStackTrace line patching", ->
err = new Error 'error'
ok err.stack.indexOf('test/error_messages.coffee:47:4') >= 0 # should be fixed to the correct line if more lines added to this file
ok err.stack.match /test\/error_messages\.coffee:\d+:\d+\b/
fs = require 'fs'