Skip to content

Commit

Permalink
fix(adapter-tests): Ensure multi tests can run standalone (#2608)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Apr 24, 2022
1 parent 3b2ca0a commit d7243f2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/adapter-tests/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

test('.patch multi query same', async () => {
const service = app.service(serviceName);
const multiBefore = service.options.multi;

service.options.multi = true;

const params = {
query: { age: { $lt: 10 } }
};
Expand All @@ -480,10 +484,16 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

await service.remove(dave[idProp]);
await service.remove(david[idProp]);

service.options.multi = multiBefore;
});

test('.patch multi query changed', async () => {
const service = app.service(serviceName);
const multiBefore = service.options.multi;

service.options.multi = true;

const params = {
query: { age: 10 }
};
Expand All @@ -508,6 +518,8 @@ export default (test: AdapterMethodsTest, app: any, _errors: any, serviceName: s

await service.remove(dave[idProp]);
await service.remove(david[idProp]);

service.options.multi = multiBefore;
});

test('.patch + NotFound', async () => {
Expand Down

0 comments on commit d7243f2

Please sign in to comment.