fix
This commit is contained in:
parent
94f7ec85e9
commit
7939aaf3a7
@ -179,7 +179,7 @@ test ('recursive filter multifield', (t) => {
|
|||||||
];
|
];
|
||||||
const filtered = [ { name: 'foo', f: 'include' } ];
|
const filtered = [ { name: 'foo', f: 'include' } ];
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: [
|
field: [
|
||||||
'name',
|
'name',
|
||||||
'f'
|
'f'
|
||||||
],
|
],
|
||||||
@ -189,21 +189,12 @@ test ('recursive filter multifield', (t) => {
|
|||||||
t.deepEqual (filtered, result);
|
t.deepEqual (filtered, result);
|
||||||
});
|
});
|
||||||
|
|
||||||
test ('recursive filter multifield input error', (t) => {
|
|
||||||
t.notThrows (() => {
|
|
||||||
util.recursive_filter (
|
|
||||||
[ { foo: 'bar' } ],
|
|
||||||
[ { fields: '', field: 'foo', filter: /a/u } ]
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
test ('recursive filter undefined multifield', (t) => {
|
test ('recursive filter undefined multifield', (t) => {
|
||||||
const res = util.recursive_filter (
|
const res = util.recursive_filter (
|
||||||
[ { foo: 'bar' } ],
|
[ { foo: 'bar' } ],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
fields: [
|
field: [
|
||||||
'foo',
|
'foo',
|
||||||
'bar'
|
'bar'
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user