Sha256: 81471d1e0bf0e7e71e041921bc257a4bd3289e51b86446fbefed1bcd22557cb3
Contents?: true
Size: 747 Bytes
Versions: 31
Compression:
Stored size: 747 Bytes
Contents
require("../env"); require("../../d3"); var vows = require("vows"), assert = require("assert"); var suite = vows.describe("d3.keys"); suite.addBatch({ "keys": { topic: function() { return d3.keys; }, "enumerates every defined key": function(keys) { assert.deepEqual(keys({a: 1, b: 1}), ["a", "b"]); }, "includes keys defined on prototypes": function(keys) { function abc() { this.a = 1; this.b = 2; } abc.prototype.c = 3; assert.deepEqual(keys(new abc()), ["a", "b", "c"]); }, "includes keys with null or undefined values": function(keys) { assert.deepEqual(keys({a: undefined, b: null, c: NaN}), ["a", "b", "c"]); } } }); suite.export(module);
Version data entries
31 entries across 31 versions & 2 rubygems