mirror of
https://github.com/vale981/grapher
synced 2025-03-06 01:51:38 -05:00
updated tests
This commit is contained in:
parent
7142f3bc3e
commit
55f593719f
1 changed files with 22 additions and 3 deletions
|
@ -368,10 +368,10 @@ describe('Hypernova', function () {
|
|||
assert.isFunction(clone.setParams({}).fetchOne);
|
||||
});
|
||||
|
||||
it('Should work with $postFilter', function () {
|
||||
it('Should work with $postFilters', function () {
|
||||
let query = createQuery({
|
||||
posts: {
|
||||
$postFilter: {
|
||||
$postFilters: {
|
||||
'comments.text': 'Non existing comment',
|
||||
},
|
||||
title: 1,
|
||||
|
@ -386,7 +386,7 @@ describe('Hypernova', function () {
|
|||
|
||||
query = createQuery({
|
||||
posts: {
|
||||
$postFilter: {
|
||||
$postFilters: {
|
||||
'comments.text': 'Good',
|
||||
},
|
||||
title: 1,
|
||||
|
@ -398,4 +398,23 @@ describe('Hypernova', function () {
|
|||
|
||||
assert.isTrue(query.fetch().length > 0);
|
||||
})
|
||||
|
||||
it('Should work with $postOptions', function () {
|
||||
let query = createQuery({
|
||||
posts: {
|
||||
$postOptions: {
|
||||
limit:5,
|
||||
skip:5,
|
||||
sort:{title:1}
|
||||
},
|
||||
title: 1,
|
||||
comments: {
|
||||
text: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const data = query.fetch();
|
||||
assert.lengthOf(data, 5);
|
||||
})
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue