Backend tests fixed
This commit is contained in:
parent
cba0645f92
commit
9090c56c64
|
@ -3,13 +3,13 @@ const catchErrors = require('../../../../../../services/utils/jasmineHelpers').c
|
|||
|
||||
describe('Client listWorkers', () => {
|
||||
it('should call the listWorkers()', done => {
|
||||
let callback = (error, result) => {
|
||||
if (error) return catchErrors(done)(error);
|
||||
app.models.Client.listWorkers()
|
||||
.then(result => {
|
||||
let amountOfEmployees = Object.keys(result).length;
|
||||
|
||||
expect(amountOfEmployees).toEqual(6);
|
||||
done();
|
||||
};
|
||||
app.models.Client.listWorkers(callback);
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
});
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
const totalGreuge = require('../total');
|
||||
const totalGreuge = require('../sumAmount');
|
||||
const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors;
|
||||
|
||||
describe('Greuge totalGreuge()', () => {
|
|
@ -26,7 +26,7 @@ function vnBoot(app, rootDir, rootModule) {
|
|||
|
||||
// View
|
||||
|
||||
let viewDir = path.join(rootDir, '../client');
|
||||
let viewDir = `${rootDir}/../client`;
|
||||
|
||||
if (fs.existsSync(viewDir)) {
|
||||
app.set('view engine', 'ejs');
|
||||
|
|
Loading…
Reference in New Issue