open-index/open-npm huggingface dataset:
npm package: @financial-times/ccc-test-helpers
Description: Shared test helpers for FT Custom Code Components
Latest version: 2.1.5

# ccc-test-helpers

Shared testing utilities for Custom Code Components (CCC) monorepo.
This package centralises reusable testing helpers used across the CCC monorepo and scaffolded CCC projects. Its purpose is to standardise common testing patterns and avoid duplication across projects.

Scope
This package contains shared utilities for:
- E2E testing using Playwright
- Unit testing using Vitest
- CCC-specific mocking and lifecycle helpers
- Shared fixtures and test setup utilities

## E2E testing using Playwright
- Utilities to simplify Playwright-based end-to-end tests for CCC projects (mocking component loaders, wiring event listeners, test fixtures, etc.).
- Designed to be used alongside the monorepo E2E setup and Scaffolded CCC projects

Quick example

```js
import { setUpCCCErrorEventListener } from "@financial-times/ccc-test-helpers/playwright/browser";

```
### Unit Testing
A library of utilities to support unit testing of CCC projects using Vitest.

```js
import {} from "@financial-times/ccc-test-helpers/unit-test";
```

#### Project files
- Playwright browser helpers: [ccc-test-helpers/src/playwright/browser.ts](ccc-test-helpers/src/playwright/browser.ts)
- Unit test helpers entrypoint: [ccc-test-helpers/src/unit-test/index.ts](ccc-test-helpers/src/unit-test/index.ts)
- Configuration: [ccc-test-helpers/tsconfig.json](ccc-test-helpers/tsconfig.json)
- Package metadata / scripts: [ccc-test-helpers/package.json](ccc-test-helpers/package.json)
npm package: @financial-times/di2-whitesource
Description: The actual whitesource NPM library has some opportunities for improvement.  We've wrapped it up here to realise those opportunities and stop that extra code leaking into all our projects.
Latest version: 2.0.1

# di2-whitesource

The actual whitesource NPM library has some opportunities for improvement.  We've wrapped it up here to realise those opportunities and stop that extra code leaking into all our projects.

## How to use actually?

```
npm install --save-dev @financial-times/di2-whitesource
```

Then in your Makefile `deploy-prod` task add `whitesource --prod`, and `whitesource` to your `deploy-latest` task.

(Note: it's recommended to add the `whitesource` / `whitesource --prod` tasks **before** the deploy has happened so that bad code never hits production.)

It is also recommended to add the following line to your `.gitignore` file:-

```
WhiteSource-log-files
```

## API

The following command runs whitesource with the given product name:-
```
whitesource "My Really Cool Product"
```

The following command runs whitesource with the given product name and adds `-prod` as a suffix to the project name:-
```
whitesource "My Really Cool Product" --prod
```

Add the following option to get whitesource to also check development dependencies (default is just to check production dependencies)
```
--include-dev-deps
```

## Won't I need some kind of API key?

Yes, you will.  It's in LastPass and it's called `WHITESOURCE_API_KEY`.