Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed Jun 24, 2018
1 parent fcb1834 commit f00568b
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {promisify} = require('util');
describe('nodejs tests', () => {
let server;
before(() => {
server = http.createServer(function(req, res) {
server = http.createServer((req, res) => {
res.writeHead(200);
res.end()
})
Expand All @@ -19,19 +19,21 @@ describe('nodejs tests', () => {
});

require('./runner')(fetchMock, global, require('node-fetch'));

describe('support for Buffers', () => {
it('can respond with a buffer', () => {
fetchMock.mock(/a/, {
sendAsJson: false,
body: new Buffer('buffer')
})
return fetchMock.fetchHandler('http://a.com')
.then(res => res.text())
.then(txt => {
expect(txt).to.equal('buffer');
});
});
});
})


describe('support for Buffers', () => {
it('can respond with a buffer', () => {
fetchMock.mock(/a/, {
sendAsJson: false,
body: new Buffer('buffer')
})
return fetchMock.fetchHandler('http://a.com')
.then(res => res.text())
.then(txt => {
expect(txt).to.equal('buffer');
});
});
});

0 comments on commit f00568b

Please sign in to comment.