ampproject / ampproject/amphtml

Run Preact unit tests on build outputs for npm

Open
#35,768 1 comment 2 reactions 0 assignees View on GitHub
Stale Type: Feature Request
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Bento Preact/React functional components have a `test-component.js` unit test file that we run against the corresponding `component.js` file. On npm, we release files that are built from `component.js`, but not tested against `test-component.js`. We should consider doing so to prevent unnecessary broken npm binaries like the one reported in #35741.

### Alternatives Considered

n/a

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the Bento Preact/React component.js and matching test-component.js files, then trace how the npm release build produces its outputs. Run the existing component unit tests against the built files and verify that every released output is covered, including the failure scenario from issue #35741.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, release, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.