Skip to content

Commit

Permalink
test: remove eslint disable handle-callback-err and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mingchuno committed Jun 18, 2019
1 parent 53af1c8 commit fb50dda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/legacy-tests.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable handle-callback-err */
'use strict'

const expressSession = require('express-session')
Expand Down Expand Up @@ -128,6 +127,7 @@ describe('legacy tests', () => {
store.set(sid, data, err => {
assert.strictEqual(err, null)
collection.findOne({ _id: sid }, (err, session) => {
assert.strictEqual(err, null)
assertSessionEquals(sid, data, session)
cleanup(store, collection, done)
})
Expand Down Expand Up @@ -210,6 +210,7 @@ describe('legacy tests', () => {
session: JSON.stringify(testData),
})
store.get(sid, (err, session) => {
assert.strictEqual(err, null)
assert.deepStrictEqual(session, testData)
cleanup(store, collection, done)
})
Expand Down Expand Up @@ -419,7 +420,9 @@ describe('legacy tests', () => {
const sid = 'test_set_memory-sid'
const data = makeData()
store.set(sid, data, async err => {
expect(err).toBeFalsy()
store.get(sid, (err, session) => {
assert.strictEqual(err, null)
for (const prop in session.session) {
if (prop === 'cookie') {
// Make sure the cookie is intact
Expand Down

0 comments on commit fb50dda

Please sign in to comment.