From d7243f20e84d9dde428ad8dfc7f48388ca569e6e Mon Sep 17 00:00:00 2001 From: David Luecke Date: Sun, 24 Apr 2022 11:29:04 -0700 Subject: [PATCH] fix(adapter-tests): Ensure multi tests can run standalone (#2608) --- packages/adapter-tests/src/methods.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/adapter-tests/src/methods.ts b/packages/adapter-tests/src/methods.ts index 219acb3c84..61d5121a88 100644 --- a/packages/adapter-tests/src/methods.ts +++ b/packages/adapter-tests/src/methods.ts @@ -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 } } }; @@ -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 } }; @@ -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 () => {