Skip to content

Commit

Permalink
Merge 6b53f57 into 89c048a
Browse files Browse the repository at this point in the history
  • Loading branch information
kroleg committed Dec 17, 2018
2 parents 89c048a + 6b53f57 commit 287f543
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -18,7 +18,6 @@
"eslint-config-egg": "3",
"istanbul": "0",
"koa": "2",
"mm": "^2.1.0",
"mocha": "3",
"mz-modules": "^2.0.0",
"pedding": "^1.1.0",
Expand Down
24 changes: 0 additions & 24 deletions test/contextstore.test.js
Expand Up @@ -3,7 +3,6 @@
const Koa = require('koa');
const request = require('supertest');
const should = require('should');
const mm = require('mm');
const session = require('..');
const ContextStore = require('./context_store');

Expand Down Expand Up @@ -696,29 +695,6 @@ describe('Koa Session External Context Store', () => {
});
});
});

describe('ctx.session', () => {
after(mm.restore);

it('should be mocked', done => {
const app = App();

app.use(async function(ctx) {
ctx.body = ctx.session;
});

mm(app.context, 'session', {
foo: 'bar',
});

request(app.listen())
.get('/')
.expect({
foo: 'bar',
})
.expect(200, done);
});
});
});

function App(options) {
Expand Down
24 changes: 0 additions & 24 deletions test/store.test.js
Expand Up @@ -3,7 +3,6 @@
const Koa = require('koa');
const request = require('supertest');
const should = require('should');
const mm = require('mm');
const session = require('..');
const store = require('./store');
const pedding = require('pedding');
Expand Down Expand Up @@ -628,29 +627,6 @@ describe('Koa Session External Store', () => {
});
});

describe('ctx.session', () => {
after(mm.restore);

it('should be mocked', done => {
const app = App();

app.use(async function(ctx) {
ctx.body = ctx.session;
});

mm(app.context, 'session', {
foo: 'bar',
});

request(app.listen())
.get('/')
.expect({
foo: 'bar',
})
.expect(200, done);
});
});

describe('when rolling set to true', () => {
let app;
before(() => {
Expand Down

0 comments on commit 287f543

Please sign in to comment.