Sha256: 40ed03e0510ce6b9c98689c01a315d8033afa636ad45c2d86eb80d8da27bc8f6

Contents?: true

Size: 832 Bytes

Versions: 31

Compression:

Stored size: 832 Bytes

Contents

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

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

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

suite.addBatch({
  "values": {
    topic: function() {
      return d3.values;
    },
    "enumerates every value": function(values) {
      assert.deepEqual(values({a: 1, b: 2}), [1, 2]);
    },
    "includes values defined on prototypes": function(values) {
      function abc() {
        this.a = 1;
        this.b = 2;
      }
      abc.prototype.c = 3;
      assert.deepEqual(values(new abc()), [1, 2, 3]);
    },
    "includes null or undefined values": function(values) {
      var v = values({a: undefined, b: null, c: NaN});
      assert.isUndefined(v[0]);
      assert.isNull(v[1]);
      assert.isNaN(v[2]);
      assert.equal(v.length, 3);
    }
  }
});

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/values-test.js
picky-statistics-4.4.2 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.4.1 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.4.0 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.3.2 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.3.1 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.3.0 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.2.4 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.2.3 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.2.2 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.2.1 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.2.0 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.1.0 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.9 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.8 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.7 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.6 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.5 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.4 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js
picky-statistics-4.0.3 lib/picky-statistics/application/javascripts/d3/test/core/values-test.js