Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Review and enhance test and release documentation for nhsuk-header-search #7

Merged
merged 2 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Review and enhance test and release documentation
  • Loading branch information
roshaanbajwa committed Mar 2, 2023
commit d172fe1b08946fc8f83e12601a637185605f02a1
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,19 @@ Run the development server
```bash
npm start
```
A test site will be available at http://localhost:3000.
A test site for local development will be available at http://localhost:3000.

### Tests
Run automated tests locally with
The test suite currently consists only of unit tests, and the tests are written using [Jest](https://jestjs.io/en/). The test and relevant setup files can be found in the [tests folder](./tests/).

To run the unit tests (with a code coverage report),
```bash
npm run test
```
To perform linting
To perform linting,
```bash
npm run lint
```

### Publication
Publication of the npm package is preformed by GitHub action. Details of the GitHub action can be found in `nhsuk-header-search/.github/workflows/release.yml`
Publication of the npm package is preformed by a GitHub action. Details of this action can be found in the [release.yml](.github/workflows/release.yml).
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"accessible-autocomplete": "^2.0.3"
},
"jest": {
"testEnvironment": "jsdom",
"setupFiles": [
"./tests/setup-jest.js"
]
Expand Down
4 changes: 4 additions & 0 deletions tests/header-search.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @jest-environment jsdom
*/

import { suggestion, source, onConfirm, addFormEvents, initAutoComplete, } from "../src/js/header-search";
import { JSDOM } from "jsdom";

Expand Down