B:\testem\node_bug>node -v
v0.8.6
B:\testem\node_bug>mocha -V
1.3.2
B:\testem\node_bug>node spawn.js
| var exec = require('child_process').exec | |
| var spawn = require('child_process').spawn | |
| var p = spawn('mocha', ['tests.js', '-R', 'tap']) | |
| p.stdout.on('data', function(data){ | |
| process.stdout.write(data + '') | |
| }) | |
| p.on('exit', function(){ | |
| process.exit(0) | |
| }) | |
| setInterval(function(){}, 1000) |
| $ mocha tests.js | |
| ․․ | |
| ✔ 2 tests complete (3ms) | |
| • 1 test pending | |
| $ mocha tests.js -R tap | |
| 1..2 | |
| ok 1 something does type coersion with == |
| db.element_views.group({ | |
| key: {element_id: true} | |
| , cond: { | |
| browser: 'Chrome', | |
| os: 'MacOS', | |
| device_type: 'Desktop' | |
| } | |
| , reduce: function(v, prev){ | |
| prev.sum++ | |
| } |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Test Page</title> | |
| <script src="jquery.js"></script> | |
| <script> | |
| $(function(){ | |
| $.ajax({ | |
| url: '/api', | |
| success: function(data){ |
| var webdriver = require('wd') | |
| , assert = require('assert'); | |
| var browser = webdriver.remote( | |
| "ondemand.saucelabs.com" | |
| , 80 | |
| , "username-string" | |
| , "access-key-string" | |
| ); |
| launchers: | |
| Node: | |
| command: "mocha -R tap test/*_test.js" | |
| protocol: "tap" | |
| launch_in_dev: | |
| - Node | |
| - Chrome | |
| launch_in_ci: | |
| - Node | |
| - Chrome |
| describe('stuff should break', function(){ | |
| it('should break', function(){ | |
| Foo() | |
| }) | |
| }) |
| describe('TEST', function(){ | |
| it('SHOULD PASS', function(){ | |
| "st".indexOf1('x') | |
| }) | |
| }) |