Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit 7c926ea

Browse files
committed
Remove table of contents from docs
1 parent 173e0b5 commit 7c926ea

1 file changed

Lines changed: 5 additions & 23 deletions

File tree

README.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@
88

99
Mocks server with extensible fixtures groupables in predefined behaviors. Behavior can be changed using built-in CLI or REST API.
1010

11-
## Table of contents
12-
13-
- [Getting started](#getting-started)
14-
- [Installation](#installation)
15-
- [Usage](#usage)
16-
- [Interactive CLI](#interactive-cli)
17-
- [Rest Api](#rest-api)
18-
- [Programmatic usage](#programmatic-usage)
19-
- [CLI](#cli)
20-
- [Server](#server)
21-
- [Global usage](#global-usage)
22-
- [Options](#Options)
23-
- [Defining mocks](#defining-mocks)
24-
2511
## Getting Started
2612

2713
This package provides a server that simulates API behaviors. As input, it needs "fixtures", which are responses for specific uris, and "behaviors", which are sets of "fixtures".
@@ -36,8 +22,6 @@ npm i @mocks-server/main --save-dev
3622

3723
## Usage
3824

39-
### Interactive CLI
40-
4125
Add an script to your `package.json` file, including the path to your mocks folder:
4226

4327
```json
@@ -163,7 +147,7 @@ module.exports = {
163147
};
164148
```
165149

166-
### REST API
150+
## REST API
167151

168152
The server includes a REST API that allows to change dinamically the current behavior, change delay time, etc. This is __very useful when running acceptance tests, as you can change the behavior of the api__ simply with a request in your tests `before` method.
169153

@@ -178,9 +162,7 @@ Available api resources are:
178162
* `PUT` `/mocks/settings` Change current server settings.
179163
* Request body example: `{ "delay": 3000 }`
180164

181-
### Programmatic usage
182-
183-
#### Server
165+
## Programmatic usage
184166

185167
The server can be instantiated and started programmatically:
186168

@@ -202,7 +184,7 @@ startMyServer().then(server => {
202184
});
203185
```
204186

205-
##### `Server` (behaviorsFolder \[,options\])
187+
#### `Server` (behaviorsFolder \[,options\])
206188

207189
First argument is mandatory, and has to be a path to a folder containing "behaviors" and "fixtures". All files in the folder will be loaded recursively, including subfolders.
208190
For second argument options, please read the [options](#options) chapter of this documentation.
@@ -223,7 +205,7 @@ Available getters are:
223205

224206
> The interactive CLI can be started programatically too. Read the [cli advanced docs](./docs/cli.md) for further info.
225207
226-
### Global usage
208+
## Global usage
227209

228210
The mocks server can be used as a global dependency as well:
229211

@@ -237,7 +219,7 @@ Now, you can start the built-in command line interface from anywhere, providing
237219
mocks-server --behaviors=./path-to-behaviors
238220
```
239221

240-
### Support (OS Terminals)
222+
## Support (OS Terminals)
241223

242224
This package uses [inquirer][inquirer-url] for displaying CLI. You can [consult his OS Terminals support here][inquirer-support].
243225

0 commit comments

Comments
 (0)