npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@desoukya/lib-e2e-js

v0.0.1

Published

<img src="https://askripka.files.wordpress.com/2020/04/cucumberjs2.png" align="right" alt="Cucumber JS" width="120" height="140">

Downloads

1

Readme

lib-e2e-js

An end-to-end framework for executing integration tests against JavaScript/TypeScript backend servers. This framework utilizes the following libraries, frameworks, and technologies:

  • Cucumber
  • Gherkin
  • Docker

How It Works

  1. Create .feature file(s) with e2e scenario(s) using Gherkin syntax
  2. Run the e2e framework which will do the following:
    • spins up docker container(s) of the database(s)
    • starts the server in e2e mode
  3. Executes live requests against server and database
  4. Asserts response conforms to expected output
  5. Generates a report of the results

Setup

To integrate the e2e framework in a nodejs application, follow these steps:

  1. Install the package:

    npm install --save @desoukya/lib-e2e-js
    npm install --save-dev @cucumber/cucumber cucumber-html-reporter

    or

    yarn add @desoukya/lib-e2e-js
    yarn add --dev --save-dev @cucumber/cucumber cucumber-html-reporter
  2. Add e2e related scripts in package.json:

      "scripts": {
    +   "prebuild": "rimraf dist",
        "build": "nest build",
    -   "start": "nest start",
    +   "start": "NODE_ENV=local nest start",
    +   "start:e2e": "NODE_ENV=e2e nest start",
    +   "e2e": "node node_modules/.bin/e2e-start"
      }
  3. Add a directory ./e2e to the root of your project with a config file called config.js:

    module.exports = {
      appPreBuildTimeout: 2000,
      appBuildTimeout: 6000,
      couchbaseStartupTimeout: 3000,
      serverStartupTimeout: 4000,
      e2eStartupTimeout: 5000,
      images: [
        {
          name: "couchbase",
          image: "dockerhub.hilton.com/couchbase:enterprise-7.6.2
          port: 8091,
        },
      ],
    };
    • The e2e process consists of steps that run sequentially. The steps do not support a callback interface so there is no mechanism to be informed when a step has completed. For this reason, we rely on manually configured timeouts. Given that each machine specs are different, if your machine requires more time to start up a nest js server for example, you can bump the timeout from 4000 to 8000.
    • Images represents project dependencies your app requires to successfully setup an end-to-end environment. For example, if your app connects to both couchbase and kafka, add both image objects.