Skip to content

Commit

Permalink
[test] Added global declaration (required for standard), fixed strict…
Browse files Browse the repository at this point in the history
… typo, fixed missing var errors
  • Loading branch information
markbao committed Jan 23, 2016
1 parent a98ff49 commit 4cef296
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
4 changes: 3 additions & 1 deletion test/generate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"use scrict";
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
Expand Down
4 changes: 3 additions & 1 deletion test/hotp_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"use scrict";
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
Expand Down
10 changes: 6 additions & 4 deletions test/notp_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"use scrict";
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
Expand Down Expand Up @@ -63,7 +65,7 @@ it("HOTP", function() {
assert.ok(!speakeasy.hotp.verify(options), 'Should not pass');

// countercheck for passes
for(i=0;i<HOTP.length;i++) {
for(var i=0;i<HOTP.length;i++) {
options.counter = i;
options.token = HOTP[i];

Expand Down Expand Up @@ -182,7 +184,7 @@ it("HOTPOutOfSync", function() {
assert.ok(speakeasy.hotp.verify(options), 'Should pass for value of window >= 9');

// countercheck that test should pass for negative counter values
token = '755224';
// token = '755224';
options.counter = 7
options.window = 8;
assert.ok(speakeasy.hotp.verify(options), 'Should pass for negative counter values');
Expand Down Expand Up @@ -224,7 +226,7 @@ it("hotp_gen", function() {
speakeasy.hotp(options);

// countercheck for passes
for(i=0;i<HOTP.length;i++) {
for(var i=0;i<HOTP.length;i++) {
options.counter = i;
assert.equal(speakeasy.hotp(options), HOTP[i], 'HOTP value should be correct');
}
Expand Down
2 changes: 2 additions & 0 deletions test/rfc4226_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
var speakeasy = require('..');
Expand Down
2 changes: 2 additions & 0 deletions test/rfc6238_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
var speakeasy = require('..');
Expand Down
4 changes: 3 additions & 1 deletion test/totp_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"use scrict";
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
Expand Down
4 changes: 3 additions & 1 deletion test/url_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"use scrict";
"use strict";

/* global describe, it */

var chai = require('chai');
var assert = chai.assert;
Expand Down

0 comments on commit 4cef296

Please sign in to comment.