added browserify test

This commit is contained in:
Evan Wallace 2013-07-21 19:01:25 -07:00
parent 70c343e4c4
commit e773027aef
4 changed files with 25 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules
browserify-test/compiled.js
browserify-test/script.js
browserify-test/script.map

4
browserify-test/build.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
coffee --map --compile script.coffee
browserify --debug script.js > compiled.js

View File

@ -0,0 +1,5 @@
<p>
Make sure to run build.sh.
This test should say either "Test failed" or "Test passed":
</p>
<script src="compiled.js"></script>

View File

@ -0,0 +1,12 @@
(require '../source-map-support').install()
foo = -> throw new Error 'foo'
try
foo()
catch e
if /\bscript\.coffee\b/.test e.stack
document.write 'Test passed'
else
document.write 'Test failed'
console.log e.stack