Sha256: 24c655081dc0649dc4151bc97c75514bc02aeadbeb416c4faeaace0674b8c1ab

Contents?: true

Size: 717 Bytes

Versions: 31

Compression:

Stored size: 717 Bytes

Contents

require("../env");
require("../../d3");

var vows = require("vows"),
    assert = require("assert");

var suite = vows.describe("d3.merge");

suite.addBatch({
  "merge": {
    "merges an array of arrays": function() {
      var a = {}, b = {}, c = {}, d = {}, e = {}, f = {};
      assert.deepEqual(d3.merge([[a], [b, c], [d, e, f]]), [a, b, c, d, e, f]);
    },
    "returns a new array": function() {
      var input = [[1, 2, 3], [4, 5], [6]];
      assert.isFalse(d3.merge(input) === input);
    },
    "does not modify the input arrays": function() {
      var input = [[1, 2, 3], [4, 5], [6]];
      d3.merge(input);
      assert.deepEqual(input, [[1, 2, 3], [4, 5], [6]]);
    }
  }
});

suite.export(module);

Version data entries

31 entries across 31 versions & 2 rubygems

Version Path
picky-statistics-4.5.0 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.4.2 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.4.1 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.4.0 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.3.2 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.3.1 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.3.0 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.2.4 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.2.3 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.2.2 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.2.1 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.2.0 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.1.0 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.9 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.8 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.7 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.6 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.5 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.4 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js
picky-statistics-4.0.3 lib/picky-statistics/application/javascripts/d3/test/core/merge-test.js