oolong
Version:
Utilities for objects. Simple, tasteful and plentiful. Supports inherited properties.
12 lines (9 loc) • 322 B
JavaScript
var O = require("../..")
describe("Oolong.keys", function() {
it("must return all enumerable keys of an object", function() {
O.keys({a: 1, b: 2}).must.eql(["a", "b"])
})
it("must return inherited enumerable keys of an object", function() {
O.keys(Object.create({a: 1, b: 2})).must.eql(["a", "b"])
})
})