Blame view

framework/thirdparty/jasmine/spec/suites/BaseSpec.js 914 Bytes
0084d336   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  describe("base.js", function() {
    describe("jasmine.MessageResult", function() {
      it("#toString should pretty-print and concatenate each part of the message", function() {
        var values = ["log", "message", 123, {key: "value"}, "FTW!"];
        var messageResult = new jasmine.MessageResult(values);
        expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!");
      });
    });
  
    describe("jasmine.log", function() {
      it("should accept n arguments", function() {
        spyOn(jasmine.getEnv().currentSpec, 'log');
        jasmine.log(1, 2, 3);
        expect(jasmine.getEnv().currentSpec.log).toHaveBeenCalledWith(1, 2, 3);
      });
    });
  
    describe("jasmine.getGlobal", function() {
      it("should return the global object", function() {
        var globalObject = (function() {
          return this;
        })();
  
        expect(jasmine.getGlobal()).toBe(globalObject);
      });
    });
  });