test refactor to async await
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
163bf2464b
commit
6b11f26296
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue