renived private method tests and implemented HeadLessChrome on Karma and removed Firefox as browser
This commit is contained in:
parent
6dba8c7a40
commit
0e88c2c4e7
|
@ -61,7 +61,20 @@ module.exports = function(config) {
|
||||||
|
|
||||||
// start these browsers
|
// start these browsers
|
||||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||||
browsers: ['Chrome', 'Firefox'],
|
browsers: ['ChromeNoSandboxHeadless'],
|
||||||
|
customLaunchers: {
|
||||||
|
ChromeNoSandboxHeadless: {
|
||||||
|
base: 'Chrome',
|
||||||
|
flags: [
|
||||||
|
'--no-sandbox',
|
||||||
|
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
|
||||||
|
'--headless',
|
||||||
|
'--disable-gpu',
|
||||||
|
// Without a remote debugging port, Google Chrome exits immediately.
|
||||||
|
' --remote-debugging-port=9222'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// Continuous Integration mode
|
// Continuous Integration mode
|
||||||
// if true, Karma captures browsers, runs the tests and exits
|
// if true, Karma captures browsers, runs the tests and exits
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import filter from '../filter';
|
|
||||||
|
|
||||||
describe('Client filterClients()', () => {
|
|
||||||
it('should call the filterClients method', () => {
|
|
||||||
let params = {
|
|
||||||
page: 1,
|
|
||||||
size: 1,
|
|
||||||
search: 'Bruce Wayne',
|
|
||||||
phone: 555555555
|
|
||||||
};
|
|
||||||
let client = jasmine.createSpyObj('client', ['installMethod']);
|
|
||||||
filter(client);
|
|
||||||
let filterClients = client.installMethod.calls.allArgs()[0][1];
|
|
||||||
let nameOfResultingClient = filterClients(params).where.and[0].or[1].name.regexp;
|
|
||||||
|
|
||||||
expect(nameOfResultingClient).toEqual('Bruce Wayne');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,23 +0,0 @@
|
||||||
import filter from '../filter';
|
|
||||||
|
|
||||||
describe('Greuge filterParams()', () => {
|
|
||||||
it('should call the filterParams method', () => {
|
|
||||||
let params = {
|
|
||||||
clientFk: 1,
|
|
||||||
page: 1,
|
|
||||||
size: 1,
|
|
||||||
order: 'DESC'
|
|
||||||
};
|
|
||||||
let self = jasmine.createSpyObj('self', ['installMethod']);
|
|
||||||
filter(self);
|
|
||||||
let filterParams = self.installMethod.calls.allArgs()[0][1];
|
|
||||||
|
|
||||||
expect(filterParams(params)).toEqual({
|
|
||||||
where: Object({clientFk: 1}),
|
|
||||||
skip: 0,
|
|
||||||
limit: 1,
|
|
||||||
order: 'DESC',
|
|
||||||
include: Object({relation: 'greugeType', scope: Object({fields: ['id', 'name']})})
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue