Skip to content

Commit

Permalink
v6.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dherault committed May 20, 2020
1 parent f9abe8d commit ac96241
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
5 changes: 3 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"dedicatedTo": "Blue, a great migrating bird.",
"name": "serverless-offline",
"version": "6.1.5",
"version": "6.1.6",
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
"license": "MIT",
"main": "dist/main.js",
Expand All @@ -14,7 +14,8 @@
"prepublishOnly": "npm run lint && npm run build",
"test": "npm run build && jest --verbose --silent --runInBand",
"test:cov": "npm run build && jest --coverage --silent --runInBand --collectCoverageFrom=src/**/*.js",
"test:log": "npm run build && jest --verbose"
"test:log": "npm run build && jest --verbose",
"test:noBuild": "jest --verbose --runInBand --bail"
},
"repository": {
"type": "git",
Expand Down
14 changes: 6 additions & 8 deletions src/ServerlessOffline.js
Expand Up @@ -292,14 +292,12 @@ export default class ServerlessOffline {
events.forEach((event) => {
const { http, httpApi, schedule, websocket } = event

if (http || httpApi) {
if (functionDefinition.handler) {
httpEvents.push({
functionKey,
handler: functionDefinition.handler,
http: http || httpApi,
})
}
if ((http || httpApi) && functionDefinition.handler) {
httpEvents.push({
functionKey,
handler: functionDefinition.handler,
http: http || httpApi,
})
}

if (schedule) {
Expand Down
1 change: 1 addition & 0 deletions tests/old-unit/offline.test.js
Expand Up @@ -1008,6 +1008,7 @@ describe('Offline', () => {
}).toObject()

const res = await offline.inject('/dev/echo/foo?bar=baz')
console.log('res.result', res.result)
const result = parse(res.result)

expect(result.queryString).toHaveProperty('bar', 'baz')
Expand Down

0 comments on commit ac96241

Please sign in to comment.