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

@middy/warmup

Package Overview
Dependencies
Maintainers
10
Versions
205
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/warmup - npm Package Compare versions

Comparing version 1.0.0-alpha.40 to 1.0.0-alpha.41

14

__tests__/index.js

@@ -11,3 +11,3 @@ const middy = require('../../core')

describe('🥃 Warmup', () => {
test(`Should exit with 'warmup' if provided warmup check function is provide and returns true`, (endTest) => {
test('Should exit with \'warmup\' if provided warmup check function is provide and returns true', (endTest) => {
const handler = middy((event, context, cb) => {

@@ -29,3 +29,3 @@ cb()

test(`Should exit with 'warmup' if event.source === 'serverless-plugin-warmup' if no warmup check function provided`, (endTest) => {
test('Should exit with \'warmup\' if event.source === \'serverless-plugin-warmup\' if no warmup check function provided', (endTest) => {
const handler = middy((event, context, cb) => {

@@ -48,3 +48,3 @@ cb()

test(`It should print in the console when exiting because of warmup and the onWarmup function is not redefined`, (endTest) => {
test('It should print in the console when exiting because of warmup and the onWarmup function is not redefined', (endTest) => {
console.log = jest.fn()

@@ -68,3 +68,3 @@

test(`Should execute handler if provided warmup check function returns false`, (endTest) => {
test('Should execute handler if provided warmup check function returns false', (endTest) => {
const handler = middy((event, context, cb) => {

@@ -83,3 +83,3 @@ cb(null, 'handler executed')

test(`Should execute handler with callbackWaitsForEmptyEventLoop if waitForEmptyEventLoop true`, (endTest) => {
test('Should execute handler with callbackWaitsForEmptyEventLoop if waitForEmptyEventLoop true', (endTest) => {
console.log = jest.fn()

@@ -105,3 +105,3 @@

test(`Should execute handler with callbackWaitsForEmptyEventLoop if waitForEmptyEventLoop false`, (endTest) => {
test('Should execute handler with callbackWaitsForEmptyEventLoop if waitForEmptyEventLoop false', (endTest) => {
console.log = jest.fn()

@@ -129,3 +129,3 @@

test(`Should execute handler with callbackWaitsForEmptyEventLoop unchanged if waitForEmptyEventLoop is not set`, (endTest) => {
test('Should execute handler with callbackWaitsForEmptyEventLoop unchanged if waitForEmptyEventLoop is not set', (endTest) => {
console.log = jest.fn()

@@ -132,0 +132,0 @@

{
"name": "@middy/warmup",
"version": "1.0.0-alpha.40",
"version": "1.0.0-alpha.41",
"description": "Warmup (cold start mitigation) middleware for the middy framework",

@@ -45,3 +45,3 @@ "engines": {

},
"gitHead": "74c5e808c4658460bc198abd945ebefd4b7b6c90"
"gitHead": "aa244c76000d1896ada6d683637a7c280127aa79"
}
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