koa-lite/test/response/remove.js
2017-05-11 11:30:32 +08:00

14 lines
311 B
JavaScript

'use strict';
const assert = require('assert');
const context = require('../helpers/context');
describe('ctx.remove(name)', () => {
it('should remove a field', () => {
const ctx = context();
ctx.set('x-foo', 'bar');
ctx.remove('x-foo');
assert.deepEqual(ctx.response.header, {});
});
});