Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 2.01 KB

File metadata and controls

47 lines (36 loc) · 2.01 KB

This package provides lightweight browser and timing helpers reused by MdWrk package tests.

Maintenance Status

This is a legacy bridge package in groupsum/markdown_workspace.

  • Active maintenance moved to groupsum/mdwrk.
  • Install compatibility remains on the same npm package name: @mdwrk/testing.
  • Repository source of truth: https://github.com/groupsum/mdwrk/tree/master/packages/shared/testing
  • Bridge releases from this repo emit an install-time deprecation warning so downstream users can migrate without an immediate package rename.

Why

Use it when you need small shared test utilities without dragging app-specific test setup into library packages.

What

  • In-memory storage helpers.
  • A matchMedia stub for browser-like test environments.
  • Timing helpers shared across package test suites.

Installation

Node.js 20.x through 22.x, matching the workspace engine contract in the root package manifest.

npm install -D @mdwrk/testing

Usage

import { createMemoryStorage, installMatchMediaStub } from "@mdwrk/testing";

const storage = createMemoryStorage({ draft: "# MdWrk" });
const restore = installMatchMediaStub(false);

restore();

Related