Skip to content

Commit

Permalink
Merge master, fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Jun 1, 2019
1 parent 8ac8df9 commit 3a8c820
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/integration/offline.js
Expand Up @@ -552,13 +552,13 @@ describe('Offline', () => {
.addFunctionHTTP('index', {
path: 'index',
method: 'GET',
}, () =>
new Promise(resolve =>
setTimeout(() =>
}, () =>
new Promise(resolve =>
setTimeout(() =>
resolve({
statusCode: 200,
body: JSON.stringify({ message: 'Hello World' }),
}),
}),
10)
)
).toObject();
Expand All @@ -567,7 +567,7 @@ describe('Offline', () => {
method: 'GET',
url: '/index',
payload: { data: 'input' },
}, res => {
}).then(res => {
expect(res.headers).to.have.property('content-type').which.contains('application/json');
expect(res.statusCode).to.eq(200);
expect(res.payload).to.eq('{"message":"Hello World"}');
Expand All @@ -580,20 +580,20 @@ describe('Offline', () => {
.addFunctionHTTP('index', {
path: 'index',
method: 'GET',
}, (request, context, cb) =>
setTimeout(() =>
}, (request, context, cb) =>
setTimeout(() =>
cb(null, {
statusCode: 200,
body: JSON.stringify({ message: 'Hello World' }),
}),
}),
10)
).toObject();

offline.inject({
method: 'GET',
url: '/index',
payload: { data: 'input' },
}, res => {
}).then(res => {
expect(res.headers).to.have.property('content-type').which.contains('application/json');
expect(res.statusCode).to.eq(200);
expect(res.payload).to.eq('{"message":"Hello World"}');
Expand All @@ -615,7 +615,7 @@ describe('Offline', () => {
method: 'GET',
url: '/index',
payload: { data: 'input' },
}, res => {
}).then(res => {
expect(res.headers).to.have.property('content-type').which.contains('application/json');
expect(res.statusCode).to.eq(200);
done();
Expand Down

0 comments on commit 3a8c820

Please sign in to comment.