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

scipio-geppetto

v0.0.16

Published

slim wrapper around puppeteer and jest for e2e testing

Downloads

3

Readme

Geppetto @scipio/geppetto

Geppetto is nothing special. It is a simple facade infront of babel jest and puppeteer. It also makes for a convient dependency for a bunch or smaller packages commonly used in QA testing. It takes any babel and/or jest conguration files and adds a custom geppetto configuration to manage puppetere. It also combines commonly bundled puppetere calls into a simplified API while still exposing the raw puppetere browser and page objects.

Setup

Install packages

In the project root run:

npm i

Configuration

Configure Geppetto With Envronment Variables and or Configuration files

Environment Variables

| ENV name | required | default Value | | ----------------------- | --------------- | --------------------- | | GEP_CONFIG_PATH | no | | | GEP_COVERAGE | no | false | | GEP_TEST_TIMEOUT | no | 5000 | | GEP_VERBOSE | no | true | | GEP_HEADLESS | no | false | | GEP_SLO_MO | no | 10 | | GEP_BASE_URL | no | http://localhost:3015 |

Configuration files

There are several Configuration files that you can optionally override. Look at the configuration file before you override it cause there many Environment variables embedded inside of them.

geppetto.config.js
module.exports = {
    browser: {

	    headless: process.env.GEP_HEADLESS !== undefined 
			? process.env.GEP_HEADLESS 
			: false,

	    slowMo: process.env.GEP_SLO_MO !== undefined 
			? process.env.GEP_SLO_MO 
			: 10,

	    devtools: false,

	    args: ['--disable-infobars', '--window-size=1200,900'],

    	defaultViewport: null,
    },
    
    baseURL: process.env.GEP_BASE_URL || "http://localhost:3015"
};
  • By default boon E2E Empty Project will have a geppetto.config.js file that point to this location

  • Any file that replaces this one will be the one used by Geppetto.

  • You can override geppetto.config.js by setting GEP_CONFIG_PATH environment variable to a relative path from current working dir process.cmd()

module.exports = require('@boon/geppetto/geppetto.config.js')
jest.config.js
module.exports = {
	collectCoverage: process.env.GEP_COVERAGE !== undefined 
    ? process.env.GEP_COVERAGE
    : false,
  
  testMatch: [
    "**/test/**/*.test.js",
    "**/test/**/*.spec.js",
    "**/e2e/**/*.test.js",
    "**/e2e/**/*.spec.js"
  ],

  testPathIgnorePatterns: ['node_modules', 'dist'],

  testTimeout: process.env.GEP_TEST_TIMEOUT !== undefined 
    ? process.env.GEP_TEST_TIMEOUT
    : 5000,
  
  verbose: process.env.GEP_VERBOSE !== undefined 
    ? process.env.GEP_VERBOSE
    : true
}
  • This is a stanard Jest config file Jest Configuratiopn

  • Any file that replaces this one will be the one used by Jest.

  • By default boon E2E Empty Project will have a jest.config.js file that point to this location

module.exports = require('@boon/geppetto/jest.config.js')
babel.config.js
module.exports = {
	presets:[
		["@babel/preset-env",{
			targets: {
				node:"current"
			}
		}]
	]
}
  • This is a stanard Babel config file Babel Configuratiopn

  • Any file that replaces this one will be the one used by Jest.

  • default boon E2E Empty Project will have a babel.config.js file that point to this location

module.exports = require('@boon/geppetto/babel.config.js')

Publish geppetto

To publish a new version of geppetto, update package.json with the next version number and run:

npm run publish

Troubleshooting

> @scipio/[email protected] test
> jest --runInBand --detectOpenHandles

sh: jest: command not found

try to install jest globally.

npm i -g jest-cli