Skip to content

Commit 7150b5f

Browse files
committed
remove smoke tests
1 parent 03cc6a7 commit 7150b5f

6 files changed

Lines changed: 19 additions & 12 deletions

File tree

BOOKMARKS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ Why the library lives under `packages/module/` instead of a root `src/` / `tests
4545

4646
**Added by**: AgentReady remediation | **Date**: 2026-04-09
4747

48+
### [ADR 0002 — Jest at the workspace root](./docs/adr/0002-unit-testing-with-jest.md)
49+
50+
Jest config at the repo root, `yarn test` / `--passWithNoTests`, and lint-staged related tests.
51+
52+
**Added by**: AgentReady remediation | **Date**: 2026-04-10
53+
54+
### [ADR 0003 — CI PR checks (reusable workflow)](./docs/adr/0003-ci-pr-checks-via-reusable-workflow.md)
55+
56+
PR checks via `check-pr` calling the reusable `build-lint-test` workflow.
57+
58+
**Added by**: AgentReady remediation | **Date**: 2026-04-10
59+
4860
---
4961

5062
## Development Resources

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# react-user-feedback
22

3-
A React component library for collecting user feedback via a form in a modal. Built with React, TypeScript, PatternFly, and Webpack.
3+
A React component library for collecting user feedback via a form in a modal. Built with React, TypeScript, and PatternFly; the library builds with **TypeScript (`tsc`)**, and local extension docs use the **PatternFly documentation framework** (`pf-docs-framework`).
44

55
## Structure
66

@@ -25,9 +25,9 @@ This repo is a **Yarn workspaces** monorepo. The **shipped library** is **`@patt
2525

2626
```bash
2727
yarn build # Build the library
28-
yarn test # Run Jest for packages/
28+
yarn test # Run Jest for packages/ (passes with no tests until you add *.test.* / __tests__; uses --passWithNoTests)
2929
yarn lint # Lint all of packages/ (like CI)
30-
yarn lint-staged # What Husky runs on commit: Prettier + ESLint + jest --findRelatedTests on staged files only
30+
yarn lint-staged # What Husky runs on commit: Prettier + ESLint + jest --findRelatedTests --passWithNoTests on staged files only
3131
```
3232

3333
For accessibility testing:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ yarn build
1717

1818
**Lint:** **`yarn lint`** — ESLint for JS/TS and Markdown under `packages/` (see `package.json` for `lint:js` / `lint:md` / `lint:markdownlint`).
1919

20-
**Unit tests:** Jest uses `jest.setup.js`; tests live under `packages/`. Run **`yarn test`**. **Husky** runs **`lint-staged`** on commit; on staged `packages/**/*.{js,jsx,ts,tsx}` it runs Prettier, ESLint, and **`jest --findRelatedTests`**.
20+
**Unit tests:** Jest uses `jest.setup.js` at the repo root; add tests under `packages/` (e.g. `*.test.*` or `__tests__/`). Run **`yarn test`** — it uses **`--passWithNoTests`** so CI stays green until tests exist. **Husky** runs **`lint-staged`** on commit; on staged `packages/**/*.{js,jsx,ts,tsx}` it runs Prettier, ESLint, and **`jest --findRelatedTests`** (with **`--passWithNoTests`**).
2121

2222
**Accessibility:** use two terminals — (1) `yarn build:docs && yarn serve:docs` (2) `yarn test:a11y`. **`yarn serve:a11y`** opens the generated a11y report after tests.
2323

docs/adr/0002-unit-testing-with-jest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Accepted
88

99
## Context
1010

11-
The library ships from **`packages/module`**, but contributors expect a single **`yarn test`** entry point from the repository root. We need consistent time zones for snapshots, a minimal guard against an empty Jest configuration, and fast feedback on pre-commit for staged changes.
11+
The library ships from **`packages/module`**, but contributors expect a single **`yarn test`** entry point from the repository root. We need consistent time zones for snapshots, and fast feedback on pre-commit for staged changes. The root **`yarn test`** uses **`--passWithNoTests`** so CI and local runs stay green until real component tests are added.
1212

1313
## Decision
1414

1515
- **Jest is configured at the repo root** (`jest.config.js`, `jest.setup.js`) with **`roots`** aimed at **`packages/`** so tests in the workspace are discovered without a root-level `tests/` directory.
1616
- **Default timezone** for tests is set in **`jest.setup.js`** (and mirrored in the **`yarn test`** script where needed) so date-sensitive output is stable in CI and locally.
17-
- A small **smoke test** under `packages/module` ensures the suite is non-empty and the wiring stays valid.
17+
- **`yarn test`** passes with **no test files** (`--passWithNoTests`) so we do not maintain placeholder tests solely to satisfy Jest.
1818
- **lint-staged** may run **`jest --findRelatedTests`** on staged source files to keep pre-commit fast.
1919

2020
## Consequences

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"lint:markdownlint": "markdownlint --dot -p .markdownlintignore \"**/*.md\"",
2020
"lint": "yarn lint:js && yarn lint:md && yarn lint:markdownlint",
2121
"lint-staged": "lint-staged",
22-
"test": "TZ=EST jest packages",
22+
"test": "TZ=EST jest packages --passWithNoTests",
2323
"test:a11y": "yarn workspace @patternfly/react-user-feedback test:a11y",
2424
"serve:a11y": "yarn workspace @patternfly/react-user-feedback serve:a11y",
2525
"prepare": "husky install"

packages/module/src/__tests__/smoke.test.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)