jsdom-worker - ๐Ÿ‘ท‍โ™€๏ธ Use Web Workers in Jest / JSDOM ๐ŸŒˆ

  •        219

This is an experimental implementation of the Web Worker API (specifically Dedicated Worker) for JSDOM. It does not currently do any real threading, rather it implements the Worker interface but all work is done in the current thread. jsdom-worker runs wherever JSDOM runs, and does not require Node.

https://npm.im/jsdom-worker
https://github.com/developit/jsdom-worker

Dependencies:

mitt : ^1.1.3
uuid-v4 : ^0.1.0

Tags
Implementation
License
Platform

   




Related Projects

jest-dom - :owl: Custom jest matchers to test the state of the DOM

  •    Javascript

You want to use jest to write tests that assert various things about the state of a DOM. As part of that goal, you want to avoid all the repetitive patterns that arise in doing so. Checking for an element's attributes, its text content, its css classes, you name it. The @testing-library/jest-dom library provides a set of custom jest matchers that you can use to extend jest. These will make your tests more declarative, clear to read and to maintain.

react-testing-mocha-jsdom - Unit testing React Components with Mocha + jsdom

  •    Javascript

This is Part 2 of the series "Modular Isomorphic React JS applications". See Part 1 and Part 3 for more. Unit testing React is traditionally done using Jest which dictates the use of the Jasmine testing framework, and enforces mocking of all require calls. For such an unopinionated rendering engine, this is a very opinionated setup, resulting in issues such as overly-verbose unmocking of requires, and being tied into Jasmine's limited framework.

vue-jest - Jest Vue transformer

  •    Javascript

To define vue-jest as a transformer for your .vue files, you need to map .vue files to the vue-jest module. A full config will look like this.

jest-puppeteer - Run your tests using Jest & Puppeteer ๐ŸŽชโœจ

  •    Javascript

Gold Sponsors are those who have pledged $100/month and more to jest-puppeteer. Writing integration test can be done using Puppeteer API but it can be complicated and hard because API is not designed for testing.

ts-jest - TypeScript preprocessor with sourcemap support for Jest

  •    TypeScript

ts-jest is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript. It supports all features of TypeScript including type-checking. Read more about Babel7 + preset-typescript vs TypeScript (and ts-jest).


worker-plugin - ๐Ÿณ Adds native Web Worker bundling support to Webpack.

  •    Javascript

Automatically bundle & compile Web Workers within Webpack. The best part? That worker constructor works just fine without bundling turned on too.

jest-cheat-sheet - Jest cheat sheet

  •    

I recommend Mrm and jest-codemods for single-command Jest installation and easy migration from other frameworks. See more examples in Jest docs.

jest-in-case - Jest utility for creating variations of the same test

  •    Javascript

In your Jest tests, import cases from jest-in-case. Then you can call cases with a title, a tester, and some testCases.

jest-image-snapshot - Jest matcher for image comparisons

  •    Javascript

Jest matcher that performs image comparisons using pixelmatch and behaves just like Jest snapshots do! Very useful for visual regression testing. The failure threshold can be set in percent, in this case if the difference is over 1%.

jest-preset-angular - Jest configuration preset for Angular projects.

  •    TypeScript

A preset of Jest configuration for Angular projects. This is a part of the article: Testing Angular faster with Jest.

react-webworker - โš™๏ธ Communicate with a Web Worker from React

  •    Javascript

Easy communication with a Web Worker or Service Worker from React. React component for easy communication with a Web Worker. Leverages the Render Props pattern for ultimate flexibility as well as the new Context API for ease of use. Just specify the public url to your Web Worker and you'll get access to any messages or errors it sends, as well as the postMessage handler. Also works with Service Workers.

majestic - โšก Zero config UI for Jest

  •    TypeScript

Majestic is an electron app that provides a UI for running tests with Jest. Jest CLI itself provides one of the best testing experiences available today. But Majestic humbly tries to expand upon it by providing a rich UI to be used during the dev/test loop.Ok, I lied partially about the zero config part.

jest-styled-components - Jest utilities for Styled Components

  •    Javascript

A set of utilities for testing Styled Components with Jest. This package improves the snapshot testing experience and provides a brand new matcher to make expectations on the style rules. Jest snapshot testing is an excellent way to test React components (or any serializable value) and make sure things don't change unexpectedly. It works with Styled Components but there are a few problems that this package addresses and solves.

jest-extended - Additional Jest matchers ๐Ÿƒ๐Ÿ’ช

  •    Javascript

Jest is an amazing test runner and has some awesome assertion APIs built in by default. However there are times when having more specific matchers (assertions) would be far more convenient. If you've come here to help contribute - Thanks! Take a look at the contributing docs as a way of getting started.

vscode-jest - The optimal flow for Jest based testing in VS Code

  •    TypeScript

A comprehensive experience when using Facebook's Jest within a project. Orta Therox (@orta), Sean Poulter (@seanpoulter), Vincent Voyer (@vvo) & ConnectDotz (@connectdotz).

workly - A really simple way to move a function or class to a web worker. ๐Ÿ‹๏ธ‍โ™€๏ธ→ ๐Ÿ˜„

  •    Javascript

Moving a function to a worker is really simple. The above examples only work when the class/function is not dependent on the containing scope, i.e. other libraries or global objects. But, you can create a custom worker.js file and move the code in there. In the worker, you can expose your object/function/class using workly.expose method.

promise-worker - Promise-based messaging for Web Workers and Service Workers

  •    Javascript

A small and performant library for communicating with Web Workers or Service Workers, using Promises. Post a message to the worker, get a message back. Note that you require() two separate APIs, so the library is split between the worker.js and main file. This keeps the total bundle size smaller.

Jest - ElasticSearch Java Rest Client

  •    Java

Jest is a Java HTTP Rest client for ElasticSearch. ElasticSearch already has a Java API which is also used by ElasticSearch internally, but Jest fills a gap, it is the missing client for ElasticSearch Http Rest interface.

Jasmine-Matchers - A huge library of test matchers for Jasmine and Jest.

  •    Javascript

A huge library of test matchers for a range of common use-cases, compatible with all versions of Jasmine and Jest. Custom Matchers make tests easier to read and produce relevant and useful messages when they fail.

expect-jsx - โœ… toEqualJSX for expect assertion library

  •    Javascript

Note from maintainers Since Jest supports snapshot testing, we recommend you to use that instead of expect-jsx. expect-jsx is no more compatible with recent Jest versions (22), it can be made compatible so feel free to open a PR if so.