Socket
Book a DemoInstallSign in
Socket

@inrupt/jest-jsdom-polyfills

Package Overview
Dependencies
Maintainers
5
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inrupt/jest-jsdom-polyfills

This package provides various polyfills needed on jest/jsdom when using the Inrupt SDKs

latest
Source
npmnpm
Version
4.0.5
Version published
Maintainers
5
Created
Source

@inrupt/jest-jsdom-polyfills

This package contains polyfills for Web APIs that we use from the Inrupt SDKs that don't currently exist in jsdom which is used by Jest.

Installation

  • npm install --save-dev @inrupt/jest-jsdom-polyfills

Usage:

Add the following line to your Jest Test Setup file, usually you'll have this configured as jest.setup.ts or something similar.

import "@inrupt/jest-jsdom-polyfills"

Done, the SDKs should now have everything they need to be tested via jest / jsdom.

ESM / CJS Compatibility

The Inrupt SDKs currently rely on some modules that require ESM, in order to load those with Jest, you need to opt into using ESM and configure your environment appropriately.

Keywords

inrupt

FAQs

Package last updated on 21 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts