npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hmcts/et-shared-test-library

v1.0.1

Published

Employment Tribunal Shared TypeScript Playwright test utilities for cross-repo reuse.

Readme

@hmcts/et-shared-test-library

Shared TypeScript Playwright test utilities for Employment Tribunal projects.

This package contains reusable test helpers, page objects, fixtures, API utilities, data factories, and resource files used across ET UI/API test suites.

It is designed to be consumed both:

  • inside this repository (et-ccd-callbacks) during local/CI test execution
  • from other repositories by installing @hmcts/et-shared-test-library

What this package provides

  • Reusable Playwright-oriented helpers and common test abstractions
  • Shared test data/resource payloads under resources/
  • Shared config and fixture exports for consistent usage across repos
  • A publishable package surface via dist/ and package exports

Package structure

  • src/ — TypeScript source code for shared utilities
  • resources/ — static test payloads/files (included in package)
  • dist/ — compiled output (generated by build)
  • package.json — package metadata, exports, scripts, publish config

Exports

Defined in package.json:

  • @hmcts/et-shared-test-library
  • @hmcts/et-shared-test-library/config
  • @hmcts/et-shared-test-library/config/global/global-setup
  • @hmcts/et-shared-test-library/config/global/global-teardown
  • @hmcts/et-shared-test-library/fixtures/common
  • @hmcts/et-shared-test-library/resources/*

Requirements

  • Node.js >=20.11.1
  • Yarn 4.x (project uses Yarn Berry; current package manager [email protected])

Playwright-related dependencies

The package keeps these in both devDependencies and peerDependencies:

  • @playwright/test
  • playwright-core
  • @hmcts/playwright-common

This ensures:

  • local/CI TypeScript builds can resolve types/imports
  • consumers explicitly provide compatible runtime/tooling dependencies

Install

In another repository

yarn add @hmcts/et-shared-test-library

In this repository (workspace/portal development flow)

Install dependencies from repository root:

yarn install

Build the shared package before running tests that consume it:

yarn build:shared

Build, test, lint (inside et-shared-test-library)

yarn clean
yarn build
yarn build:package
yarn build:watch
yarn lint
yarn typecheck

Usage example

import { users, config, CaseTypeLocation } from '@hmcts/et-shared-test-library';
import { test } from '@hmcts/et-shared-test-library/fixtures/common';
import userDetails from '@hmcts/et-shared-test-library/resources/payload/user-details.json';

Resource files are packaged and available via package exports (for example under @et-shared-test-library/core/resources/...), so consumers in other repos do not need local relative paths to this repository.

Publishing

Publishing is automated via GitHub Actions workflow for et-shared-test-library changes.

Current release behavior:

  • workflow builds and validates package
  • version uniqueness is checked against npm
  • package is published to npm with provenance

Typical release flow:

  1. Update version in package.json
  2. Build and test the package
  3. Publish to registry
yarn build
npm publish

Versioning policy (mandatory)

If you change any framework/shared library source or exported behavior under et-shared-test-library (for example src/**, resources/**, exports, fixtures, config, or helpers), you must bump et-shared-test-library/package.json version before merge.

  • Patch: backward-compatible fix/refactor (x.y.Z)
  • Minor: backward-compatible feature (x.Y.z)
  • Major: breaking change (X.y.z)
  • Prerelease (when needed): x.y.z-beta.n

PRs that modify framework package files without a version bump should be treated as incomplete.

Notes for contributors

  • Keep reusable logic in this package, not in consuming test repos.
  • Prefer stable package-relative resource access for cross-repo compatibility.
  • Keep ESM-safe imports/exports (.js for relative paths in TS source where required by runtime).
  • Do not commit stale build output; generate dist/ via yarn build.
  • If consumers fail with missing entry points, verify build output and package exports alignment.

License

MIT