Socket
Socket
Sign inDemoInstall

jest-environment-puppeteer

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-environment-puppeteer - npm Package Compare versions

Comparing version 8.0.5 to 8.0.6

9

dist/index.d.ts

@@ -57,9 +57,2 @@ import NodeEnvironment from 'jest-environment-node';

type JestPuppeteerGlobal = Required<StrictGlobal>;
declare global {
var browser: Global["browser"];
var page: Global["page"];
var context: Global["context"];
var puppeteerConfig: Global["puppeteerConfig"];
var jestPuppeteer: Global["jestPuppeteer"];
}
declare class PuppeteerEnvironment extends NodeEnvironment {

@@ -71,2 +64,2 @@ setTimeout(timeout: number): void;

export { JestPuppeteerConfig, JestPuppeteerGlobal, PuppeteerEnvironment as default };
export { JestPuppeteerConfig, JestPuppeteerGlobal, PuppeteerEnvironment as TestEnvironment, PuppeteerEnvironment as default };

5

dist/index.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var NodeEnvironment = require('jest-environment-node');

@@ -260,2 +262,3 @@ var cosmiconfig = require('cosmiconfig');

module.exports = PuppeteerEnvironment;
exports.TestEnvironment = PuppeteerEnvironment;
exports.default = PuppeteerEnvironment;
{
"name": "jest-environment-puppeteer",
"description": "Puppeteer environment for Jest.",
"version": "8.0.5",
"version": "8.0.6",
"type": "commonjs",

@@ -58,3 +58,3 @@ "main": "./dist/index.js",

},
"gitHead": "05992b2c3082b68bac0fffb8e4f1847a7ae4472d"
"gitHead": "f756dc3ee3dae34a0a5c1855598f54c45fea9441"
}

@@ -203,4 +203,18 @@ # jest-environment-puppeteer

## Create custom environment
It is possible to create a custom environment from the Jest Puppeteer's one. It is not different from creating a custom environment from "jest-environment-node". See [Jest `testEnvironment` documentation](https://jestjs.io/docs/configuration#testenvironment-string) to learn more about it.
```js
// my-custom-environment
const JestPuppeteerEnvironment =
require("jest-environment-puppeteer").TestEnvironment;
class CustomEnvironment extends JestPuppeteerEnvironment {
// Implement your own environment
}
```
## Inspiration
Thanks to Fumihiro Xue for his great [Jest example](https://github.com/xfumihiro/jest-puppeteer-example).
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