added browserify test
This commit is contained in:
parent
70c343e4c4
commit
e773027aef
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal 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
4
browserify-test/build.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
coffee --map --compile script.coffee
|
||||
browserify --debug script.js > compiled.js
|
5
browserify-test/index.html
Normal file
5
browserify-test/index.html
Normal 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>
|
12
browserify-test/script.coffee
Normal file
12
browserify-test/script.coffee
Normal 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
|
Loading…
Reference in New Issue
Block a user