Sha256: bb96c9ebe470aee4bf996eb34b0b03973f054abb23be867eaa903082e7f7e942

Contents?: true

Size: 867 Bytes

Versions: 19

Compression:

Stored size: 867 Bytes

Contents

describe("EasyGem.extend",function () {
  var target = {
    array: ["a", "b"],
    c: {f: 5, t: 8, arr: [{a: 7, b: 3}]},
    f: [5, 6, 7]
  };
  var source = {
    array: ["c"],
    c: {f: 6, g: 5, arr: [{v: 1, b: 2}, {ff: 1}]},
    k: {a: "g"}
  };
  it("shallow",function () {
    var e1 = {
      array: ["c"],
      c: {f: 6, g: 5, arr: [{v: 1, b: 2}, {ff: 1}]},
      f: [5, 6, 7],
      k: {a: "g"}
    };
    var r1 = EasyGem.extend(JSON.parse(JSON.stringify(target)), JSON.parse(JSON.stringify(source)));
    expect(r1).toEqual(e1);
  });
  it("deep",function () {
    var e2 = {
      array: ["c", "b"],
      c: {f: 6, g: 5, t: 8, arr: [{a: 7, v: 1, b: 2}, {ff: 1}]},
      f: [5, 6, 7],
      k: {a: "g"}
    };
    var r2 = EasyGem.extend(true,JSON.parse(JSON.stringify(target)), JSON.parse(JSON.stringify(source)));
    expect(r2).toEqual(e2);
  });
});

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
redmine_extensions-0.4.5 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.5.1 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.4.4 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.4.3 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.4.1 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.4.0 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.4.0.beta app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.11 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.10 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.9 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.8 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.7 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.6 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.4 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.3 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.2 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.3.00 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.2.16 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js
redmine_extensions-0.2.14 app/assets/javascripts/redmine_extensions/jasmine_tests/extend.js