Specs without expectations should be alerted to the user
- Add console.error to the HtmlReporter when there is a spec without any expectation - Change the spec's link text and color to include a warning - Create a status for specs to label them as "empty" - console is not accessible to IE unless you have developer tools open, so protect against that by mocking console. [#59424794]
This commit is contained in:
parent
71dbffeaef
commit
1922514f2d
@@ -193,9 +193,10 @@ describe("Spec", function() {
|
||||
expect(done).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("#status returns passing by default", function() {
|
||||
var spec = new j$.Spec({fn: jasmine.createSpy("spec body")});
|
||||
expect(spec.status()).toEqual('passed');
|
||||
it("#status returns empty by default", function(){
|
||||
var emptySpec = new j$.Spec({ fn: function () {} });
|
||||
emptySpec.execute();
|
||||
expect(emptySpec.status()).toBe("empty");
|
||||
});
|
||||
|
||||
it("#status returns passed if all expectations in the spec have passed", function() {
|
||||
|
||||
Reference in New Issue
Block a user