1
0
Fork 0

Outputting current test for browser

- Output is hidden on success, but useful on failure
closure/master
Mike Gerwitz 2011-03-06 10:55:13 -05:00
parent 6b79999adb
commit 4eda438f14
3 changed files with 11 additions and 2 deletions

View File

@ -26,7 +26,12 @@ var common = require( './common' ),
assert = require( 'assert' ),
Class = common.require( 'class' ),
Script = process.binding( 'evals' ).Script,
sandbox = {};
// sandbox in which combined script will be run
sandbox = {
// stub document.write() so we don't blow up
document: { write: function() {} },
};
var files = [ 'ease.js', 'ease-full.js' ],

View File

@ -24,7 +24,7 @@
catch ( e )
{
body.style.color = 'red';
body.innerHTML = '<p>' + e.message + '</p>' +
body.innerHTML += '<p>' + e.message + '</p>' +
'<p><em>ease.js is not guaranteed to run properly within this ' +
'browser.</em></p>' +
'<p>If building ease.js, remember to run <tt>`make combine` ' +

View File

@ -127,6 +127,10 @@ if [ "$INC_TEST" ]; then
echo "{"
echo " var exports = module.exports = {};"
# write out current test to make debugging easier in browsers with very
# little debugging support
echo " document.write( '$module...<br />' )"
# add the module, removing trailing commas
cat $filename | $RMTRAIL