mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 02:50:10 +00:00
added a new test...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fca5c0a976
commit
9b24acc4ee
10
test.js
10
test.js
@ -659,17 +659,21 @@ var cases = test.Cases({
|
|||||||
assert.array(
|
assert.array(
|
||||||
object.values(obj, 'x', true)
|
object.values(obj, 'x', true)
|
||||||
.map(function(e){ return e.value }),
|
.map(function(e){ return e.value }),
|
||||||
// XXX essert ignores the order here -- this should fail...
|
// XXX assert ignores the order here -- this should fail...
|
||||||
[123, 321], '.values(.., true) ')
|
[123, 321], '.values(.., true) ')
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
object.values(obj, 'x', function(){ return object.STOP })[0] == 321,
|
object.values(obj, 'x', function(){ return object.STOP })[0] == 321,
|
||||||
// XXX essert ignores the order here -- this should fail...
|
// XXX assert ignores the order here -- this should fail...
|
||||||
'.values(.., func) ')
|
'.values(.., func) ')
|
||||||
assert(
|
assert(
|
||||||
object.values(obj, 'x', function(){ return object.STOP }, true)[0].value == 321,
|
object.values(obj, 'x', function(){ return object.STOP }, true)[0].value == 321,
|
||||||
// XXX essert ignores the order here -- this should fail...
|
// XXX assert ignores the order here -- this should fail...
|
||||||
'.values(.., func, true) ')
|
'.values(.., func, true) ')
|
||||||
|
assert(
|
||||||
|
object.values(obj, 'x', function(){ return object.STOP(555) }, true)[0] == 555,
|
||||||
|
// XXX assert ignores the order here -- this should fail...
|
||||||
|
'.values(.., func, true) with explicit stop value')
|
||||||
},
|
},
|
||||||
deepKeys: function(assert){
|
deepKeys: function(assert){
|
||||||
var a = {
|
var a = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user