Skip to content

Commit a6c9f44

Browse files
committed
docs: startServer return Express app object
1 parent 8366114 commit a6c9f44

File tree

4 files changed

+52
-17
lines changed

4 files changed

+52
-17
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- "12"
34
- "10"
45
- "9"
56
- "8"

README.md

Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Telegraf Test - Simple Test ToolKit of Telegram Bots
1515

1616
## Installation
1717

18-
Module available through the [npm registry](https://www.npmjs.com/). It can be installed using the [`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) or [`yarn`](https://yarnpkg.com/en/) command line tools.
18+
Module available through the [npm registry](https://www.npmjs.com/). It can be installed using the [`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) or [`yarn`](https://yarnpkg.com/en/) command line tool.
1919

2020
```sh
21-
# NPM
22-
npm install telegraf-test --save
23-
# Or Using Yarn
21+
# Yarn (Recomend)
2422
yarn add telegraf-test
23+
# NPM
24+
npm install telegraf-test --save
2525
```
2626

2727
## Example
@@ -126,6 +126,10 @@ Return request of [axios](https://github.com/axios/axios) or `false` in updates
126126

127127
Telegram Bot Api Server Emulator. Start with `startServer()`.
128128

129+
- **startServer()** - Return Express App Object
130+
131+
Support methods:
132+
129133
- [x] [getMe](https://core.telegram.org/bots/api#getme)
130134
- [x] [setWebhook](https://core.telegram.org/bots/api#setwebhook)
131135
- [x] [getWebhookInfo](https://core.telegram.org/bots/api#deletewebhook)
@@ -217,23 +221,53 @@ Set environment variables `DEBUG=telgraf:test`.
217221
To run the test suite, first install the dependencies, then run `test`:
218222

219223
```sh
220-
# NPM
221-
npm test
222-
# Or Using Yarn
224+
# Using Yarn
223225
yarn test
226+
# Using NPM
227+
npm run test
224228
```
225229

226230
## Dependencies
227231

228-
- [axios](https://ghub.io/axios): Promise based HTTP client for the browser and node.js
229-
- [debug](https://ghub.io/debug): small debugging utility
230-
- [express](https://ghub.io/express): Fast, unopinionated, minimalist web framework
232+
<details>
233+
<summary><a href="https://ghub.io/axios">axios</a>: Promise based HTTP client for the browser and node.js</summary>
234+
<b>Author</b>: Matt Zabriskie</br>
235+
<b>License</b>: MIT</br>
236+
<b>Version</b>: ^0.19.2
237+
</details>
238+
<details>
239+
<summary><a href="https://ghub.io/debug">debug</a>: small debugging utility</summary>
240+
<b>Author</b>: TJ Holowaychuk</br>
241+
<b>License</b>: MIT</br>
242+
<b>Version</b>: ^4.1.1
243+
</details>
244+
<details>
245+
<summary><a href="https://ghub.io/express">express</a>: Fast, unopinionated, minimalist web framework</summary>
246+
<b>Author</b>: TJ Holowaychuk</br>
247+
<b>License</b>: MIT</br>
248+
<b>Version</b>: ^4.17.1
249+
</details>
231250

232251
## Dev Dependencies
233252

234-
- [mocha](https://ghub.io/mocha): simple, flexible, fun test framework
235-
- [telegraf](https://ghub.io/telegraf): 📡 Modern Telegram Bot Framework
236-
- [xo](https://ghub.io/xo): JavaScript happiness style linter ❤️
253+
<details>
254+
<summary><a href="https://ghub.io/mocha">mocha</a>: simple, flexible, fun test framework</summary>
255+
<b>Author</b>: TJ Holowaychuk</br>
256+
<b>License</b>: MIT</br>
257+
<b>Version</b>: 7.0.1
258+
</details>
259+
<details>
260+
<summary><a href="https://ghub.io/telegraf">telegraf</a>: Modern Telegram Bot Framework</summary>
261+
<b>Author</b>: Vitaly Domnikov</br>
262+
<b>License</b>: MIT</br>
263+
<b>Version</b>: ^3.36.0
264+
</details>
265+
<details>
266+
<summary><a href="https://ghub.io/xo">xo</a>: JavaScript linter with great defaults</summary>
267+
<b>Author</b>: Sindre Sorhus</br>
268+
<b>License</b>: MIT</br>
269+
<b>Version</b>: ^0.25.3
270+
</details>
237271

238272
## Contributors
239273

documentation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ Return request of [axios](https://github.com/axios/axios) or `false` in updates
5555

5656
Telegram Bot Api Server Emulator. Start with `startServer()`.
5757

58+
- **startServer()** - Return Express App Object
59+
60+
Support methods:
61+
5862
- [x] [getMe](https://core.telegram.org/bots/api#getme)
5963
- [x] [setWebhook](https://core.telegram.org/bots/api#setwebhook)
6064
- [x] [getWebhookInfo](https://core.telegram.org/bots/api#deletewebhook)

package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@
6464
},
6565
"xo": {
6666
"rules": {
67-
"quote-props": "warn",
68-
"eqeqeq": "warn",
69-
"array-callback-return": "warn",
70-
"require-atomic-updates": "warn",
7167
"camelcase": "off"
7268
},
7369
"semicolon": false

0 commit comments

Comments
 (0)