Skip to content

Commit

Permalink
chore(docs): clean up unit test directory and jest config (#4357)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebpollman authored Aug 17, 2023
1 parent 7680f58 commit b87a639
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 10 deletions.
15 changes: 12 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,19 @@ Note, if you're not using `nvm`, you'll need to set the environment variable: `e

### Test

- Run `yarn test` to test.
- If the snapshot test fails, run `yarn test -- -u`.
From the monorepo root run:

Test runs after build.
```sh
$ yarn docs test
```

#### Updating Props Table Snapshot

To update the Props Table snapshot run:

```sh
$ yarn docs test -u __tests__/props-table.test.ts
```

### Creating a Page

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions docs/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
* https://jestjs.io/docs/configuration
*/

export default {
collectCoverage: true,
coverageDirectory: 'coverage',
coverageProvider: 'v8',
const jestConfig = {
preset: 'ts-jest',
setupFiles: ['./jestEnv.ts'],
transform: {
'^.+\\.(ts|tsx)?$': 'ts-jest',
'^.+\\.(js|jsx)$': 'babel-jest',
},
};

export default jestConfig;
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
},
"license": "MIT",
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@supercharge/promise-pool": "^2.4.0",
"@types/jest": "^27",
"@types/lodash": "^4.14.170",
Expand Down
1 change: 0 additions & 1 deletion docs/tests/babel.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b87a639

Please sign in to comment.