Deprecated jasmineHelpers.js removed
This commit is contained in:
parent
b84d94e3a4
commit
5d84e51639
|
@ -22,9 +22,7 @@ let serviceSpecs = [
|
|||
jasmine.loadConfig({
|
||||
spec_dir: 'services',
|
||||
spec_files: serviceSpecs,
|
||||
helpers: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
]
|
||||
helpers: []
|
||||
});
|
||||
|
||||
jasmine.addReporter(new SpecReporter({
|
||||
|
|
|
@ -22,9 +22,7 @@ jasmine.loadConfig({
|
|||
'./e2e/**/*[sS]pec.js',
|
||||
'./e2e/helpers/extensions.js'
|
||||
],
|
||||
helpers: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
]
|
||||
helpers: []
|
||||
});
|
||||
|
||||
jasmine.addReporter(new SpecReporter({
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const app = require(`${servicesDir}/client/server/server`);
|
||||
const catchErrors = require(`${servicesDir}/utils/jasmineHelpers`).catchErrors;
|
||||
|
||||
describe('Client hasCustomerRole', () => {
|
||||
it('should call the hasCustomerRole() method with a customer id', done => {
|
||||
|
@ -7,7 +6,7 @@ describe('Client hasCustomerRole', () => {
|
|||
let params = {};
|
||||
|
||||
let callback = (error, result) => {
|
||||
if (error) return catchErrors(done)(error);
|
||||
if (error) return done.fail(error);
|
||||
|
||||
expect(result).toEqual(jasmine.objectContaining({isCustomer: 1}));
|
||||
done();
|
||||
|
@ -21,7 +20,7 @@ describe('Client hasCustomerRole', () => {
|
|||
let params = {};
|
||||
|
||||
let callback = (error, result) => {
|
||||
if (error) return catchErrors(done)(error);
|
||||
if (error) return done.fail(error);
|
||||
|
||||
expect(result).toEqual(jasmine.objectContaining({isCustomer: 0}));
|
||||
done();
|
||||
|
@ -35,7 +34,7 @@ describe('Client hasCustomerRole', () => {
|
|||
let params = {};
|
||||
|
||||
let callback = (error, result) => {
|
||||
if (error) return catchErrors(done)(error);
|
||||
if (error) return done.fail(error);
|
||||
|
||||
expect(result).toEqual(jasmine.objectContaining({isCustomer: 0}));
|
||||
done();
|
||||
|
@ -49,7 +48,7 @@ describe('Client hasCustomerRole', () => {
|
|||
let params = {};
|
||||
|
||||
let callback = (error, result) => {
|
||||
if (error) return catchErrors(done)(error);
|
||||
if (error) return done.fail(error);
|
||||
|
||||
expect(result).toEqual(jasmine.objectContaining({isCustomer: 0}));
|
||||
done();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const app = require(`${servicesDir}/client/server/server`);
|
||||
const catchErrors = require(`${servicesDir}/utils/jasmineHelpers`).catchErrors;
|
||||
|
||||
describe('Client listWorkers', () => {
|
||||
it('should call the listWorkers()', done => {
|
||||
|
@ -10,6 +9,6 @@ describe('Client listWorkers', () => {
|
|||
expect(amountOfEmployees).toEqual(41);
|
||||
done();
|
||||
})
|
||||
.catch(catchErrors(done));
|
||||
.catch(done.fail);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
module.exports.catchErrors = function(done) {
|
||||
return error => {
|
||||
if (error instanceof Error) {
|
||||
return done.fail(error.stack);
|
||||
}
|
||||
return done.fail(JSON.stringify(error));
|
||||
};
|
||||
};
|
|
@ -7,7 +7,7 @@ process.on('warning', warning => {
|
|||
|
||||
let verbose = false;
|
||||
|
||||
if (process.argv[2] === '--v')
|
||||
if (process.argv[2] === '--v')
|
||||
verbose = true;
|
||||
|
||||
servicesDir = `${__dirname}/services`;
|
||||
|
@ -36,9 +36,7 @@ for (let service of serviceList) {
|
|||
jasmine.loadConfig({
|
||||
spec_dir: 'services',
|
||||
spec_files: serviceSpecs,
|
||||
helpers: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
]
|
||||
helpers: []
|
||||
});
|
||||
|
||||
jasmine.addReporter(new SpecReporter({
|
||||
|
|
|
@ -6,24 +6,22 @@ process.on('warning', warning => {
|
|||
console.log(warning.stack);
|
||||
});
|
||||
|
||||
var verbose = false;
|
||||
let verbose = false;
|
||||
|
||||
if (process.argv[2] === '--v') {
|
||||
if (process.argv[2] === '--v')
|
||||
verbose = true;
|
||||
}
|
||||
|
||||
var Jasmine = require('jasmine');
|
||||
var jasmine = new Jasmine();
|
||||
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
||||
|
||||
let Jasmine = require('jasmine');
|
||||
let jasmine = new Jasmine();
|
||||
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
|
||||
|
||||
jasmine.loadConfig({
|
||||
spec_files: [
|
||||
'./e2e/smokes/**/*[sS]pec.js',
|
||||
'./e2e/helpers/extensions.js'
|
||||
],
|
||||
helpers: [
|
||||
'/services/utils/jasmineHelpers.js'
|
||||
]
|
||||
helpers: []
|
||||
});
|
||||
|
||||
jasmine.addReporter(new SpecReporter({
|
||||
|
|
Loading…
Reference in New Issue