@middy/core
Advanced tools
Comparing version 1.0.0-alpha.15 to 1.0.0-alpha.16
@@ -11,3 +11,3 @@ const middy = require('../') | ||
const handler = middy(jest.fn()) | ||
expect(() => { handler.use({foo: 'bar'}) }).toThrow('Middleware must contain at least one key among "before", "after", "onError"') | ||
expect(() => { handler.use({ foo: 'bar' }) }).toThrow('Middleware must contain at least one key among "before", "after", "onError"') | ||
}) | ||
@@ -88,3 +88,3 @@ | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -122,3 +122,3 @@ | ||
expect(handler.executedAfter).toEqual(['m2', 'm1']) | ||
expect(response).toEqual({foo: 'bar'}) | ||
expect(response).toEqual({ foo: 'bar' }) | ||
endTest() | ||
@@ -130,3 +130,3 @@ }) | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -149,3 +149,3 @@ | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -170,3 +170,3 @@ | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -189,3 +189,3 @@ | ||
expect(context.modified).toBeTruthy() | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -417,3 +417,3 @@ | ||
const handler = middy((event, context) => { | ||
return Promise.resolve({some: 'response'}) | ||
return Promise.resolve({ some: 'response' }) | ||
}) | ||
@@ -423,3 +423,3 @@ | ||
expect(err).toBeNull() | ||
expect(response).toEqual({some: 'response'}) | ||
expect(response).toEqual({ some: 'response' }) | ||
endTest() | ||
@@ -431,3 +431,3 @@ }) | ||
const handler = middy(async (event, context) => { | ||
return {some: 'response'} | ||
return { some: 'response' } | ||
}) | ||
@@ -437,3 +437,3 @@ | ||
expect(err).toBeNull() | ||
expect(response).toEqual({some: 'response'}) | ||
expect(response).toEqual({ some: 'response' }) | ||
endTest() | ||
@@ -519,3 +519,3 @@ }) | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {some: 'response'}) | ||
return callback(null, { some: 'response' }) | ||
}) | ||
@@ -540,3 +540,3 @@ | ||
handler.error = null | ||
handler.response = {result: 'The error is handled'} | ||
handler.response = { result: 'The error is handled' } | ||
} | ||
@@ -553,3 +553,3 @@ | ||
expect(err).toBeNull() | ||
expect(response).toEqual({result: 'The error is handled'}) | ||
expect(response).toEqual({ result: 'The error is handled' }) | ||
endTest() | ||
@@ -565,3 +565,3 @@ }) | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -604,3 +604,3 @@ | ||
const handler = middy((event, context, callback) => { | ||
return callback(null, {foo: 'bar'}) | ||
return callback(null, { foo: 'bar' }) | ||
}) | ||
@@ -607,0 +607,0 @@ |
{ | ||
"name": "@middy/core", | ||
"version": "1.0.0-alpha.15", | ||
"version": "1.0.0-alpha.16", | ||
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29705