Permalink
Browse files

Remove semi-colon from the end of each bind command (doesn't work in …

…autoexec)
  • Loading branch information...
1 parent 4bf3cb7 commit 47ab44399e441dbfd9e59089c65bcc7d228106e6 @jessewebb committed Dec 6, 2015
Showing with 12 additions and 12 deletions.
  1. +1 −1 js/buynds.js
  2. +11 −11 tests/specs/buynds.spec.js
View
@@ -57,7 +57,7 @@
});
}
- bindString = bindString.trim() + '";';
+ bindString = bindString.trim() + '"';
return bindString;
};
};
@@ -24,70 +24,70 @@ describe('buynds', function() {
it('should bind any key string', function() {
bindOptions.keyToBind = 'kp_slash';
- var expectedBind = 'bind "kp_slash" "";';
+ var expectedBind = 'bind "kp_slash" ""';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind single primary weapon', function() {
bindOptions.primaryWeapon = 'awp';
- var expectedBind = defaultKeyBind + '"buy awp;";';
+ var expectedBind = defaultKeyBind + '"buy awp;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind comma-separated primary weapon', function() {
bindOptions.primaryWeapon = 'ak47,m4a1';
- var expectedBind = defaultKeyBind + '"buy ak47; buy m4a1;";';
+ var expectedBind = defaultKeyBind + '"buy ak47; buy m4a1;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind single secondary weapon', function() {
bindOptions.secondaryWeapon = 'p250';
- var expectedBind = defaultKeyBind + '"buy p250;";';
+ var expectedBind = defaultKeyBind + '"buy p250;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind comma-separated secondary weapon', function() {
bindOptions.secondaryWeapon = 'glock,hkp2000';
- var expectedBind = defaultKeyBind + '"buy glock; buy hkp2000;";';
+ var expectedBind = defaultKeyBind + '"buy glock; buy hkp2000;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind single gear item', function() {
bindOptions.gear = ['vest'];
- var expectedBind = defaultKeyBind + '"buy vest;";';
+ var expectedBind = defaultKeyBind + '"buy vest;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind list of gear items', function() {
bindOptions.gear = ['vesthelm', 'defuser'];
- var expectedBind = defaultKeyBind + '"buy vesthelm; buy defuser;";';
+ var expectedBind = defaultKeyBind + '"buy vesthelm; buy defuser;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind single grenade', function() {
bindOptions.grenades = ['decoy'];
- var expectedBind = defaultKeyBind + '"buy decoy;";';
+ var expectedBind = defaultKeyBind + '"buy decoy;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind single comma-separated grenade', function() {
bindOptions.grenades = ['molotov,incgrenade'];
- var expectedBind = defaultKeyBind + '"buy molotov; buy incgrenade;";';
+ var expectedBind = defaultKeyBind + '"buy molotov; buy incgrenade;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
it('should bind list of grenades', function() {
bindOptions.grenades = ['smokegrenade', 'hegrenade', 'flashbang'];
- var expectedBind = defaultKeyBind + '"buy smokegrenade; buy hegrenade; buy flashbang;";';
+ var expectedBind = defaultKeyBind + '"buy smokegrenade; buy hegrenade; buy flashbang;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});
@@ -99,7 +99,7 @@ describe('buynds', function() {
bindOptions.gear = ['vesthelm', 'vest', 'defuser'];
bindOptions.grenades = ['hegrenade', 'molotov,incgrenade'];
var expectedBind = defaultKeyBind + '"buy sawedoff; buy mag7; buy deagle; buy vesthelm; buy vest; ' +
- 'buy defuser; buy hegrenade; buy molotov; buy incgrenade;";';
+ 'buy defuser; buy hegrenade; buy molotov; buy incgrenade;"';
var result = bindBuilder.build(bindOptions);
expect(result).toEqual(expectedBind);
});

0 comments on commit 47ab443

Please sign in to comment.