Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca28c32

Browse files
committed
chore: update test section in README
1 parent abc6ef6 commit ca28c32

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

‎README.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,16 @@ higher. If you experience errors, please upgrade your version of Node.js.
160160

161161
## Testing
162162

163-
The default testing framework is Mocha, though you can use whatever you want.
164-
Make sure you have it installed:
163+
The default testing framework is Jest, though you can use whatever you want.
165164

166-
```
167-
npm install -g mocha
168-
```
169-
170-
Tests should reside in `test/spec` in their appropriate folders:
165+
Tests should reside alongside the modules they are testing:
171166

172167
```
173-
├── test
174-
│ ├── spec
175-
│ │ ├── api
176-
│ │ │ ├── todos.test.js
168+
├── server
169+
│ ├── api
170+
│ │ ├── todos
171+
│ │ │ ├── todos.controller.js
172+
│ │ │ ├── todos.controller.test.js
177173
```
178174

179175
Tests can be written with ES2015, since it passes through `babel-register`.
@@ -184,21 +180,19 @@ To run a single test:
184180

185181
```
186182
npm test /path/to/single.test.js
187-
```
188183
189-
To run a directory of tests:
190-
191-
```
192-
npm test /path/to/test/directory
184+
// Or, to watch for changes
185+
npm run test:watch /path/to/single.test.js
193186
```
194187

195188
To run all tests:
196189

197190
```
198191
npm run test:all
199-
```
200192
201-
This will run all tests in the `test/spec` directory.
193+
// Or, to watch for changes
194+
npm run test:all:watch
195+
```
202196

203197
## Running ESLint
204198

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /