Gathering detailed insights and metrics for jest-browser-globals
Gathering detailed insights and metrics for jest-browser-globals
Gathering detailed insights and metrics for jest-browser-globals
Gathering detailed insights and metrics for jest-browser-globals
@patrtorg/ea-cupiditate-aperiam
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-im
@womorg/totam-expedita-quas
> Build tool and bindings loader for [`node-gyp`][node-gyp] that supports prebuilds.
@hishprorg/quas-quia-pariatur
<a name="user-content-@hishprorg/quas-quia-pariatur"></a> <a name="@hishprorg/quas-quia-pariatur"></a> # @hishprorg/quas-quia-pariatur
@diotoborg/laborum-recusandae
[![GitHub Actions CI](https://github.com/microsoft/TypeScript/workflows/CI/badge.svg)](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI) [![npm version](https://badge.fury.io/js/@diotoborg/laborum-recusandae.svg)](https://www.npmjs.com
npm install jest-browser-globals
Typescript
Module System
Node Version
NPM Version
48.7
Supply Chain
72
Quality
74.8
Maintenance
100
Vulnerability
100
License
TypeScript (71.61%)
JavaScript (27.89%)
CSS (0.44%)
Shell (0.06%)
Total Downloads
17,591
Last Day
2
Last Week
36
Last Month
567
Last Year
7,916
1 Stars
4,669 Commits
1 Forks
1 Watching
7 Branches
1 Contributors
Latest Version
25.1.0-beta
Package Id
jest-browser-globals@25.1.0-beta
Unpacked Size
131.72 kB
Size
32.46 kB
File Count
3
NPM Version
6.13.7
Node Version
13.8.0
Cumulative downloads
Total Downloads
Last day
-85.7%
2
Compared to previous day
Last week
-83.7%
36
Compared to previous week
Last month
64.8%
567
Compared to previous month
Last year
-5.9%
7,916
Compared to previous year
4
Lets you run Jest in a browser. Works with Mocha, which is expected to be in the global scope first.
Makes the following available:
jest.fn
- mock functionstest.each
- one of the few globals that
Mocha doesn't defineRun npm install --save-dev jest-browser-globals
In a test runner like Karma, include the built file in the global scope:
1// karma.config.js 2 3module.exports = { 4 frameworks: [ 'mocha' ], 5 files: [ 6 './node_modules/jest-browser-globals/build-es5/index.js' 7 // other test files... 8 ] 9}
To run it in an HTML file, do something like this:
1<!DOCTYPE html> 2<html> 3 <head> 4 <meta charset='utf-8' /> 5 <link href='https://cdn.jsdelivr.net/npm/mocha@7.0.1/mocha.css' rel='stylesheet' /> 6 <script src='https://cdn.jsdelivr.net/npm/mocha@7.0.1/mocha.js'></script> 7 <script>mocha.setup('bdd')</script> 8 <script src='./node_modules/jest-browser-globals/build-es5/index.js'></script> 9 <script> 10 11 describe('cool thing', function() { 12 test('that is works', function() { 13 expect(5).toBe(6); 14 }); 15 }); 16 17 </script> 18 </head> 19 <body> 20 <div id='mocha'></div> 21 <script>mocha.run()</script> 22 </body> 23</html>
This package has been created from a fork of the Jest Project. It aggregates
the expect
, jest-mock
, and jest-each
packages, attaches them to the
window
, and does various other things to ensure that Jest runs similarly to
how it runs in Node. It also strips out lots of dependencies that only make
sense in a Node environment, resulting in a slimmer build.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
project is fuzzed
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
no SAST tool detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
161 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More