Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
23
gaia/tests/jsmarionette/mocha/mocha-json-proxy/test/acceptance/consumer.js
Executable file
23
gaia/tests/jsmarionette/mocha/mocha-json-proxy/test/acceptance/consumer.js
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
/* global forkFixture */
|
||||
'use strict';
|
||||
var Consumer = require('../../consumer');
|
||||
var Mocha = require('mocha');
|
||||
|
||||
suite('reporter', function() {
|
||||
function testReporter(reporterType) {
|
||||
suite(reporterType, function() {
|
||||
['pass', 'fail', 'pending'].forEach(function(testType) {
|
||||
test(test, function(done) {
|
||||
var child = forkFixture(testType);
|
||||
var runner = new Consumer(child);
|
||||
/* jshint nonew: false */
|
||||
new Mocha.reporters[reporterType](runner);
|
||||
/* jshint nonew: true */
|
||||
runner.once('end', done);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
['Dot', 'Spec'].forEach(testReporter);
|
||||
});
|
||||
46
gaia/tests/jsmarionette/mocha/mocha-json-proxy/test/acceptance/reporter.js
Executable file
46
gaia/tests/jsmarionette/mocha/mocha-json-proxy/test/acceptance/reporter.js
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
/* global assert, forkFixture */
|
||||
'use strict';
|
||||
suite('reporter', function() {
|
||||
var msgs = [];
|
||||
var child;
|
||||
|
||||
setup(function(done) {
|
||||
this.timeout('10s');
|
||||
child = forkFixture('pass');
|
||||
child.on('message', function(content) {
|
||||
if (Array.isArray(content) && content[0] === 'mocha-proxy') {
|
||||
var msg = content[1];
|
||||
msgs.push(msg[0]);
|
||||
if (msg[0] === 'end') {
|
||||
return done();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test('got messages', function() {
|
||||
var expectedMsgs = [
|
||||
'start',
|
||||
'suite',
|
||||
'suite',
|
||||
'test',
|
||||
'pass',
|
||||
'test end',
|
||||
'test',
|
||||
'pass',
|
||||
'test end',
|
||||
'suite end',
|
||||
'suite',
|
||||
'test',
|
||||
'pass',
|
||||
'test end',
|
||||
'suite end',
|
||||
'suite end',
|
||||
'end'
|
||||
];
|
||||
|
||||
assert.deepEqual(msgs, expectedMsgs);
|
||||
});
|
||||
|
||||
});
|
||||
Loading…
Reference in a new issue