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