Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@middy/core

Package Overview
Dependencies
Maintainers
9
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/core - npm Package Compare versions

Comparing version 1.0.0-alpha.15 to 1.0.0-alpha.16

32

__tests__/index.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc