diff --git a/modules/client/back/methods/client/specs/getAverageInvoiced.spec.js b/modules/client/back/methods/client/specs/getAverageInvoiced.spec.js index e1eef01245..fd30270e7e 100644 --- a/modules/client/back/methods/client/specs/getAverageInvoiced.spec.js +++ b/modules/client/back/methods/client/specs/getAverageInvoiced.spec.js @@ -1,11 +1,9 @@ const app = require('vn-loopback/server/server'); describe('client getAverageInvoiced()', () => { - it('should call the getAverageInvoiced method', done => { - app.models.Client.getAverageInvoiced(101) - .then(response => { - expect(response.invoiced).toEqual(1500); - done(); - }); + it('should call the getAverageInvoiced method', async() => { + const {invoiced} = await app.models.Client.getAverageInvoiced(101); + + expect(invoiced).toEqual(1500); }); });