New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@endemolshinegroup/serverless-test-utils

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@endemolshinegroup/serverless-test-utils

Testing utilities for Serverless projects

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
19
58.33%
Maintainers
3
Weekly downloads
 
Created
Source

Banner

MIT Licensed NPM Version Build Status Greenkeeper Status

Code Issues Codebase Maintainability Test Coverage Jest

Serverless Commitizen Semantic Release Prettier

This project exports the Serverless Framework's own testing utilities so you can use them to test your own projects.

Installation

yarn add -D @endemolshinegroup/serverless-test-utils

Usage

Example

import fs from 'fs';
import path from 'path';

import {
  createTestService,
  deployService,
  removeService,
} from '@endemolshinegroup/serverless-test-utils';

describe('MyServerlessProject', () => {
  let serviceName;

  beforeAll(() => {
    serviceName = createTestService('aws-nodejs', process.cwd());
    deployService();
  });

  it('should have create cloudformation files and functions zip', () => {
    const deployedFiles = fs.readdirSync(path.join(process.cwd(), '.serverless'));
    expect(deployedFiles[0]).toEqual('cloudformation-template-create-stack.json');
    expect(deployedFiles[1]).toEqual('cloudformation-template-update-stack.json');
    expect(deployedFiles[2]).toEqual('serverless-state.json');
    expect(deployedFiles[3]).toMatch(/test-[0-9]{1,}-[0-9]{1,}.zip/);
  });

  afterAll(() => {
    removeService();
  });
});

Keywords

serverless

FAQs

Package last updated on 09 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts