Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before(function (cb) {
const lambdalocal = require("lambda-local");
lambdalocal.setLogger(winston);
const lambda = require('../../src/main.js');
let event = getEvent('AMAZON.StopIntent.json');
lambdalocal.execute({
event: event,
lambdaFunc: lambda,
lambdaHandler: functionName,
region: region,
profileName : profileName,
callbackWaitsForEmptyEventLoop: false,
timeoutMs: timeoutMs,
callback: function (_err, _done) {
done = _done;
err = _err;
if (done) {
var event = require('../requests/LaunchRequest.json');
event.session.application.applicationId = config.skillAppID;
event.request.useLocalTranslations = false;
var lambdalocal = require("lambda-local");
var winston = require("winston");
var lambda = require('../../src/main.js');
var functionName = "handler";
var timeoutMs = 3000;
var region = config.region;
var profileName = config.awsProfile;
winston.level = "error";
lambdalocal.setLogger(winston);
lambdalocal.execute({
event: event,
lambdaFunc: lambda,
lambdaHandler: functionName,
region: region,
profileName : profileName,
callbackWaitsForEmptyEventLoop: false,
timeoutMs: timeoutMs,
callback: function (_err, _done) {
done = _done;
err = _err;
if (done) {