Skip to content

Commit

Permalink
Improving output.
Browse files Browse the repository at this point in the history
  • Loading branch information
eric committed Aug 23, 2011
1 parent 95b2193 commit 79eb765
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rakefile
@@ -1,7 +1,7 @@

desc 'Run tests'
task :test do
sh "test/node/node_modules/nodeunit/bin/nodeunit --reporter skip_passed test/node/node_test.coffee"
sh "node --stack-trace-limit=2 test/node/node_modules/nodeunit/bin/nodeunit --reporter skip_passed test/node/node_test.coffee"
end

task :default => :test
9 changes: 6 additions & 3 deletions test/node/node_test.coffee
Expand Up @@ -3,7 +3,7 @@ path = require('path')

root = path.normalize(path.join(__dirname, '../..'))

files = [ 'globalization/en-US.js', 'core.js', 'extras.js', 'parser.js', 'sugarpak.js', 'time.js' ]
files = [ 'globalization/en-US.js', 'core.js', 'sugarpak.js', 'parser.js' ]

for filename in files
data = fs.readFileSync path.join(root, 'src', filename), 'utf-8'
Expand All @@ -27,9 +27,12 @@ for testDirectory in testDirectories

for testName, testBody of tests
continue if testName == 'setup'
do (setupBlock, testName, testBody) ->
do (contextName, setupBlock, testName, testBody) ->
group[testName] = (test) ->
setupBlock.call(this) if setupBlock
testBody.run.call(this) if testBody.run
test.ok(testBody.assert.call(this), testBody.assert)
if contextName == 'Fail'
test.equal(false, testBody.assert.call(this), "\n " + String(testBody.assert))
else
test.ok(testBody.assert.call(this), "\n " + String(testBody.assert))
test.done()

0 comments on commit 79eb765

Please sign in to comment.