Fix tests
This commit is contained in:
@ -16,13 +16,8 @@ describe('QueryBuilder', () => {
|
||||
it('should use where to filter data', () => {
|
||||
const params: IQuery[] = [
|
||||
{
|
||||
name: 'name',
|
||||
value: 'Charizard'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'setCode',
|
||||
value: 'base1'
|
||||
name: 'q',
|
||||
value: 'name:Charizard set.id:base1'
|
||||
}
|
||||
];
|
||||
|
||||
@ -30,14 +25,14 @@ describe('QueryBuilder', () => {
|
||||
.then(cards => {
|
||||
expect(cards.length).to.equal(1);
|
||||
expect(cards[0].id).to.equal('base1-4');
|
||||
expect(cards[0].set).to.equal('Base');
|
||||
expect(cards[0].set.name).to.equal('Base');
|
||||
});
|
||||
});
|
||||
|
||||
it('should use all to get all cards', () => {
|
||||
QueryBuilder.all<Card>(Card)
|
||||
.then(cards => {
|
||||
expect(cards.length).to.equal(1000);
|
||||
expect(cards.length).to.equal(250);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user