Refactor.
This commit is contained in:
parent
01d842fdfd
commit
1154fcaf3b
@ -1,20 +1,21 @@
|
|||||||
describe("jasmine.MessageResult", function() {
|
describe("base.js", function() {
|
||||||
|
describe("jasmine.MessageResult", function() {
|
||||||
it("#toString should pretty-print and concatenate each part of the message", function() {
|
it("#toString should pretty-print and concatenate each part of the message", function() {
|
||||||
var values = ["log", "message", 123, {key: "value"}, "FTW!"];
|
var values = ["log", "message", 123, {key: "value"}, "FTW!"];
|
||||||
var messageResult = new jasmine.MessageResult(values);
|
var messageResult = new jasmine.MessageResult(values);
|
||||||
expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!");
|
expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("jasmine.log", function() {
|
describe("jasmine.log", function() {
|
||||||
it("should accept n arguments", function() {
|
it("should accept n arguments", function() {
|
||||||
spyOn(jasmine.getEnv().currentSpec, 'log');
|
spyOn(jasmine.getEnv().currentSpec, 'log');
|
||||||
jasmine.log(1, 2, 3);
|
jasmine.log(1, 2, 3);
|
||||||
expect(jasmine.getEnv().currentSpec.log).wasCalledWith(1, 2, 3);
|
expect(jasmine.getEnv().currentSpec.log).wasCalledWith(1, 2, 3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("jasmine.getGlobal", function() {
|
describe("jasmine.getGlobal", function() {
|
||||||
it("should return the global object", function() {
|
it("should return the global object", function() {
|
||||||
var globalObject = (function() {
|
var globalObject = (function() {
|
||||||
return this;
|
return this;
|
||||||
@ -22,4 +23,5 @@ describe("jasmine.getGlobal", function() {
|
|||||||
|
|
||||||
expect(jasmine.getGlobal()).toBe(globalObject);
|
expect(jasmine.getGlobal()).toBe(globalObject);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user