Removed broken & long-disabled JsApiReporter integration specs
This commit is contained in:
@@ -1,80 +1,3 @@
|
|||||||
xdescribe('JsApiReporter (integration specs)', function() {
|
|
||||||
describe('results', function() {
|
|
||||||
var reporter, spec1, spec2;
|
|
||||||
var env;
|
|
||||||
|
|
||||||
beforeEach(function() {
|
|
||||||
env = new jasmineUnderTest.Env();
|
|
||||||
|
|
||||||
env.describe('top-level suite', function() {
|
|
||||||
spec1 = env.it('spec 1', function() {
|
|
||||||
this.expect(true).toEqual(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
spec2 = env.it('spec 2', function() {
|
|
||||||
this.expect(true).toEqual(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
env.describe('nested suite', function() {
|
|
||||||
env.it('nested spec', function() {
|
|
||||||
expect(true).toEqual(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
reporter = new jasmineUnderTest.JsApiReporter({});
|
|
||||||
env.addReporter(reporter);
|
|
||||||
|
|
||||||
env.execute();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('results() should return a hash of all results, indexed by spec id', function() {
|
|
||||||
expect(reporter.results()[spec1.id].result).toEqual('passed');
|
|
||||||
expect(reporter.results()[spec2.id].result).toEqual('failed');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return nested suites as children of their parents', function() {
|
|
||||||
expect(reporter.suites()).toEqual([
|
|
||||||
{
|
|
||||||
id: 0,
|
|
||||||
name: 'top-level suite',
|
|
||||||
type: 'suite',
|
|
||||||
children: [
|
|
||||||
{ id: 0, name: 'spec 1', type: 'spec', children: [] },
|
|
||||||
{ id: 1, name: 'spec 2', type: 'spec', children: [] },
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: 'nested suite',
|
|
||||||
type: 'suite',
|
|
||||||
children: [
|
|
||||||
{ id: 2, name: 'nested spec', type: 'spec', children: [] }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('#summarizeResult_', function() {
|
|
||||||
it('should summarize a passing result', function() {
|
|
||||||
var result = reporter.results()[spec1.id];
|
|
||||||
var summarizedResult = reporter.summarizeResult_(result);
|
|
||||||
expect(summarizedResult.result).toEqual('passed');
|
|
||||||
expect(summarizedResult.messages.length).toEqual(0);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should have a stack trace for failing specs', function() {
|
|
||||||
var result = reporter.results()[spec2.id];
|
|
||||||
var summarizedResult = reporter.summarizeResult_(result);
|
|
||||||
expect(summarizedResult.result).toEqual('failed');
|
|
||||||
expect(summarizedResult.messages[0].trace.stack).toEqual(
|
|
||||||
result.messages[0].trace.stack
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('JsApiReporter', function() {
|
describe('JsApiReporter', function() {
|
||||||
it('knows when a full environment is started', function() {
|
it('knows when a full environment is started', function() {
|
||||||
var reporter = new jasmineUnderTest.JsApiReporter({});
|
var reporter = new jasmineUnderTest.JsApiReporter({});
|
||||||
|
|||||||
Reference in New Issue
Block a user