Compare commits
7 Commits
master
...
headless-c
Author | SHA1 | Date |
---|---|---|
Román Jiménez | 9a510a8f18 | 7 years ago |
Román Jiménez | ae839dbd3f | 7 years ago |
Román Jiménez | 9aec3c2cd8 | 7 years ago |
Román Jiménez | 7dcf2425de | 7 years ago |
Román Jiménez | 0a156892cc | 7 years ago |
Román Jiménez | 1b1a899f0e | 7 years ago |
Román Jiménez | c949b89055 | 7 years ago |
@ -0,0 +1,56 @@
|
||||
/* global window:true, jasmine:true */
|
||||
|
||||
(function () {
|
||||
window.ChromeQueue = [];
|
||||
|
||||
function pushToQueue (msg) {
|
||||
window.ChromeQueue.push(msg);
|
||||
}
|
||||
|
||||
var ChromeReporter = {
|
||||
lastSpecStartTime: null,
|
||||
jasmineStarted: function (suiteInfo) {
|
||||
console.log('Jasmine started: ', new Date().toString());
|
||||
pushToQueue({
|
||||
type: 'jasmine.jasmineStarted',
|
||||
when: new Date().getTime(),
|
||||
payload: suiteInfo
|
||||
});
|
||||
},
|
||||
suiteStarted: function (result) {
|
||||
pushToQueue({
|
||||
type: 'jasmine.suiteStarted',
|
||||
payload: result
|
||||
});
|
||||
},
|
||||
specStarted: function (result) {
|
||||
this.lastSpecStartTime = new Date();
|
||||
pushToQueue({
|
||||
type: 'jasmine.specStarted',
|
||||
payload: result
|
||||
});
|
||||
},
|
||||
specDone: function (result) {
|
||||
result.duration = new Date() - this.lastSpecStartTime;
|
||||
pushToQueue({
|
||||
type: 'jasmine.specDone',
|
||||
payload: result
|
||||
});
|
||||
},
|
||||
suiteDone: function (result) {
|
||||
pushToQueue({
|
||||
type: 'jasmine.suiteDone',
|
||||
payload: result
|
||||
});
|
||||
},
|
||||
jasmineDone: function () {
|
||||
pushToQueue({
|
||||
type: 'jasmine.jasmineDone'
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var env = jasmine.getEnv();
|
||||
|
||||
env.addReporter(ChromeReporter);
|
||||
})();
|
Loading…
Reference in new issue