Sha256: d6bd8ad4916bb314dc29c1b5ea0876250b1e7f4881bea623676ab3e709dac007
Contents?: true
Size: 741 Bytes
Versions: 4
Compression:
Stored size: 741 Bytes
Contents
var vows = require("vows"), load = require("../load"), assert = require("../assert"); var suite = vows.describe("d3.keys"); suite.addBatch({ "keys": { topic: load("arrays/keys").expression("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
4 entries across 4 versions & 2 rubygems