Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fratzinger committed Jun 15, 2024
1 parent 5ead6d2 commit c436a5d
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ const testSuite = adaptertests([
'.get',
'.get + $select',
'.get + id + query',
'.get + NotFound (integer)',
'.get + NotFound (integer)', // skipping '.get + NotFound' because it expects id as string
'.find',
'.remove',
'.remove + $select',
'.remove + id + query',
'.remove + NotFound (integer)',
'.remove + NotFound (integer)', // skipping '.remove + NotFound' because it expects id as string
'.remove + multi',
'.remove + multi no pagination',
'.update',
'.update + $select',
'.update + id + query',
'.update + query + NotFound',
'.update + NotFound (integer)',
'.update + NotFound (integer)', // skipping '.update + NotFound' because it expects id as string
'.patch',
'.patch + $select',
'.patch + id + query',
Expand All @@ -46,9 +46,10 @@ const testSuite = adaptertests([
'.patch multi query same',
'.patch multi query changed',
'.patch + query + NotFound',
'.patch + NotFound (integer)',
'.patch + NotFound (integer)', // skipping '.patch + NotFound' because it expects id as string
'.create',
'.create + $select',
'.create ignores query',
'.create multi',
'internal .find',
'internal .get',
Expand All @@ -74,6 +75,8 @@ const testSuite = adaptertests([
'.find + $ne',
'.find + $gt + $lt + $sort',
'.find + $or nested + $sort',
'.find + $and',
'.find + $and + $or',
'.find + paginate',
'.find + paginate + query',
'.find + paginate + $limit + $skip',
Expand Down Expand Up @@ -260,6 +263,10 @@ describe('Feathers Sequelize Service', () => {
multi: true
}));

afterEach(() => app.service('people')
.remove(null, { query: {} })
);

describe('Common functionality', () => {
const people = app.service('people');
let kirsten: any;
Expand All @@ -268,8 +275,6 @@ describe('Feathers Sequelize Service', () => {
kirsten = await people.create({ name: 'Kirsten', age: 30 });
});

afterEach(() => people.remove(null, { query: {} }));

it('allows querying for null values (#45)', async () => {
const name = 'Null test';
await people.create({ name });
Expand Down Expand Up @@ -530,7 +535,7 @@ describe('Feathers Sequelize Service', () => {

const result = await people.remove(kirsten.id, params);

expect(result).to.have.property('orders.id');
expect(result).to.have.property('orders').with.lengthOf(3);
});

it('can use $dollar.notation$', async () => {
Expand Down

0 comments on commit c436a5d

Please sign in to comment.