From ae3167a04400bb0344f6cd6d9acf86d2ae15f213 Mon Sep 17 00:00:00 2001 From: Ans Date: Fri, 17 May 2024 13:23:37 -0400 Subject: [PATCH] Some doc updates --- docs/contributing-docs.md | 19 +++++++----------- docs/installation.md | 2 +- docs/javascript-unit-tests.md | 38 +++++++++++++++-------------------- 3 files changed, 24 insertions(+), 35 deletions(-) diff --git a/docs/contributing-docs.md b/docs/contributing-docs.md index b2773af7cdf..8f3f05884e4 100644 --- a/docs/contributing-docs.md +++ b/docs/contributing-docs.md @@ -43,16 +43,7 @@ nav: ## Running the docs locally -With a -[stand-alone Python virtualenv for consumerfinance.gov](installation.md#set-up-a-local-python-environment-optional): - -```bash -pyenv activate consumerfinance.gov -pip install -r requirements/docs.txt -mkdocs serve -a :8888 -``` - -Once running, they are accessible at http://localhost:8888. +See [Running documentation site locally](running-docs.md). ## Deploying the docs to GitHub Pages @@ -79,8 +70,12 @@ for more information. Some internal documentation is not suitable for inclusion in the public docs. -Internal documentation can be linked from publicly-viewable documentation only -if internal domain names and URLs are not shared publicly. To support such linking, +!!! warning + + Internal documentation can be linked from publicly-viewable documentation only + if internal domain names and URLs are not shared publicly. + +To support such linking, the consumerfinance.gov Wagtail admin has a custom "Internal documentation" setting that allows for dynamic linking to an internal URL without exposing that URL in public source code or documentation. diff --git a/docs/installation.md b/docs/installation.md index d9a9260bede..76375a57775 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -45,7 +45,7 @@ Using the console, navigate to the root directory in which your projects live and clone this project's repository: ```sh -git clone git@github.com:cfpb/consumerfinance.gov.git +git clone https://github.com/cfpb/consumerfinance.gov.git cd consumerfinance.gov ``` diff --git a/docs/javascript-unit-tests.md b/docs/javascript-unit-tests.md index 2b8e5ba4b03..310caa4f842 100644 --- a/docs/javascript-unit-tests.md +++ b/docs/javascript-unit-tests.md @@ -30,40 +30,34 @@ it would be a good idea to peruse their docs before diving in here. ## Running unit tests -### Run a single test file - -To run a single test file, pass the name (or path) of the spec: +To run all of the unit tests: ```bash -yarn jest Notification-spec.js -# Equivalent to: -yarn jest test/unit_tests/js/molecules/Notification-spec.js -# The name argument would technically would match all Notification-spec.js files -# This usually isn't a problem in our codebase (and you can always get more specific if needed) +yarn jest ``` -### Run a directory of unit tests - -A directory of unit tests can be run by passing its name or path: +To first lint all files and then run tests: ```bash -yarn jest organisms -yarn jest test/unit_tests/js/organisms +yarn test ``` -### Run all unit tests +!!! note -To run all of the unit tests: + To run a single test, or a directory of tests, you can run, for example: -```bash -yarn jest -``` + ```bash + # Single test file: + yarn jest Notification-spec.js + # Equivalent to: + yarn jest test/unit_tests/js/molecules/Notification-spec.js -To first lint all files and then run tests: + # Directory: + yarn jest organisms + # Equivalent to: + yarn jest test/unit_tests/js/organisms -```bash -yarn test -``` + ``` Because we invoke jest directly, you can pass any command-line args it accepts to filter your output or to target specific tests [see the docs for more](https://jestjs.io/docs/cli).