Permalink
Browse files

Delint tests.

  • Loading branch information...
1 parent 6643e87 commit 96a4727243588a6f835efefd9e2511c0da1060e6 @jaredhanson committed Mar 8, 2014
@@ -1,3 +1,5 @@
+/* global describe, it, expect, before */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -1,3 +1,6 @@
+/* global describe, it, expect, before */
+/* jshint expr: true */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -1,3 +1,6 @@
+/* global describe, it, expect, before */
+/* jshint expr: true */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -6,7 +9,7 @@ describe('Strategy', function() {
describe('handling a request with valid credentials in body using custom field names', function() {
var strategy = new Strategy({ usernameField: 'userid', passwordField: 'passwd' }, function(username, password, done) {
- if (username == 'johndoe' && password == 'secret') {
+ if (username == 'johndoe' && password == 'secret') {
return done(null, { id: '1234' }, { scope: 'read' });
}
return done(null, false);
@@ -43,7 +46,7 @@ describe('Strategy', function() {
describe('handling a request with valid credentials in body using custom field names with object notation', function() {
var strategy = new Strategy({ usernameField: 'user[username]', passwordField: 'user[password]' }, function(username, password, done) {
- if (username == 'johndoe' && password == 'secret') {
+ if (username == 'johndoe' && password == 'secret') {
return done(null, { id: '1234' }, { scope: 'read' });
}
return done(null, false);
@@ -1,3 +1,6 @@
+/* global describe, it, expect, before */
+/* jshint expr: true */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -6,7 +9,7 @@ describe('Strategy', function() {
describe('handling a request with valid credentials in body', function() {
var strategy = new Strategy(function(username, password, done) {
- if (username == 'johndoe' && password == 'secret') {
+ if (username == 'johndoe' && password == 'secret') {
return done(null, { id: '1234' }, { scope: 'read' });
}
return done(null, false);
@@ -43,7 +46,7 @@ describe('Strategy', function() {
describe('handling a request with valid credentials in query', function() {
var strategy = new Strategy(function(username, password, done) {
- if (username == 'johndoe' && password == 'secret') {
+ if (username == 'johndoe' && password == 'secret') {
return done(null, { id: '1234' }, { scope: 'read' });
}
return done(null, false);
@@ -92,8 +95,6 @@ describe('Strategy', function() {
status = s;
done();
})
- .req(function(req) {
- })
.authenticate();
});
@@ -1,3 +1,6 @@
+/* global describe, it, expect, before */
+/* jshint expr: true */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -1,3 +1,6 @@
+/* global describe, it, expect, before */
+/* jshint expr: true */
+
var chai = require('chai')
, Strategy = require('../lib/strategy');
@@ -6,7 +9,7 @@ describe('Strategy', function() {
describe('passing request to verify callback', function() {
var strategy = new Strategy({passReqToCallback: true}, function(req, username, password, done) {
- if (username == 'johndoe' && password == 'secret') {
+ if (username == 'johndoe' && password == 'secret') {
return done(null, { id: '1234' }, { scope: 'read', foo: req.headers['x-foo'] });
}
return done(null, false);
@@ -1,3 +1,5 @@
+/* global describe, it, expect */
+
var Strategy = require('../lib/strategy');
@@ -11,7 +13,7 @@ describe('Strategy', function() {
it('should throw if constructed without a verify callback', function() {
expect(function() {
- new Strategy();
+ var s = new Strategy();
}).to.throw(TypeError, 'LocalStrategy requires a verify callback');
});

0 comments on commit 96a4727

Please sign in to comment.