Skip to content

Commit 544c10c

Browse files
committed
added spec for utils
1 parent 6b5e731 commit 544c10c

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

test/unit/bin/helpers/utils.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,6 +3938,83 @@ describe('utils', () => {
39383938
});
39393939
});
39403940

3941+
describe('#setInteractiveCapability' , () => {
3942+
it('should set true if interactive caps is not passed', () => {
3943+
let bsConfig = {
3944+
run_settings: {}
3945+
}
3946+
let expectedResult = {
3947+
run_settings: {
3948+
interactiveDebugging: "true"
3949+
}
3950+
}
3951+
utils.setInteractiveCapability(bsConfig);
3952+
expect(bsConfig).to.be.eql(expectedResult);
3953+
});
3954+
3955+
it('should set true if interactiveDebugging caps passed is true', () => {
3956+
let bsConfig = {
3957+
run_settings: {
3958+
interactiveDebugging: true
3959+
}
3960+
}
3961+
let expectedResult = {
3962+
run_settings: {
3963+
interactiveDebugging: true
3964+
}
3965+
}
3966+
utils.setInteractiveCapability(bsConfig);
3967+
expect(bsConfig).to.be.eql(expectedResult);
3968+
});
3969+
3970+
it('should set true if interactive_debugging caps passed is true', () => {
3971+
let bsConfig = {
3972+
run_settings: {
3973+
interactive_debugging: true
3974+
}
3975+
}
3976+
let expectedResult = {
3977+
run_settings: {
3978+
interactive_debugging: true,
3979+
interactiveDebugging: true
3980+
}
3981+
}
3982+
utils.setInteractiveCapability(bsConfig);
3983+
expect(bsConfig).to.be.eql(expectedResult);
3984+
});
3985+
3986+
it('should set true if interactive_debugging caps passed is false', () => {
3987+
let bsConfig = {
3988+
run_settings: {
3989+
interactive_debugging: false
3990+
}
3991+
}
3992+
let expectedResult = {
3993+
run_settings: {
3994+
interactive_debugging: false,
3995+
interactiveDebugging: false
3996+
}
3997+
}
3998+
utils.setInteractiveCapability(bsConfig);
3999+
expect(bsConfig).to.be.eql(expectedResult);
4000+
});
4001+
4002+
it('should set true if interactiveDebugging caps passed is false', () => {
4003+
let bsConfig = {
4004+
run_settings: {
4005+
interactiveDebugging: false
4006+
}
4007+
}
4008+
let expectedResult = {
4009+
run_settings: {
4010+
interactiveDebugging: false
4011+
}
4012+
}
4013+
utils.setInteractiveCapability(bsConfig);
4014+
expect(bsConfig).to.be.eql(expectedResult);
4015+
});
4016+
});
4017+
39414018
describe('#setCypressNpmDependency', () => {
39424019

39434020
it('should set cypress as latest for cypress 10 test suite if cypress_version missing', () => {

0 commit comments

Comments
 (0)