Skip to content

Commit 17cacd9

Browse files
committed
Update Test
1 parent 18f2966 commit 17cacd9

File tree

9 files changed

+7721
-1999
lines changed

9 files changed

+7721
-1999
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
env: {
3+
jest: true,
4+
},
5+
extends: [
6+
'google',
7+
'plugin:prettier/recommended',
8+
'plugin:import/errors',
9+
'plugin:import/warnings',
10+
],
11+
parser: 'babel-eslint',
12+
rules: {
13+
'prettier/prettier': ['error', { singleQuote: true }],
14+
},
15+
};

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,30 @@
22

33
* <a href="#install">Installation</a>
44
* <a href="#usage">Usage</a>
5+
* <a href="#test">Test</a>
56

67
## Install
78

9+
Clone the repo:
10+
```sh
11+
$ git clone https://github.com/gcoderbh/nodejs-es6-starter-template.git [your_project_name]
812
```
9-
git clone https://github.com/gcoderbh/nodejs-es6-starter-template.git
10-
cd nodejs-es6-starter-template
11-
npm ci
12-
nodemon
13+
14+
Install dependency:
15+
```sh
16+
$ cd [your_project_name]
17+
$ npm ci
1318
```
1419

1520
## Usage
21+
```sh
22+
$ nodemon
23+
```
1624

1725
start development in `src/index.js`
18-
see in your browser at [http://localhost:3000](http://localhost:3000)
26+
see in your browser at [http://localhost:3000](http://localhost:3000)
27+
28+
## Test
29+
```sh
30+
$ npm run test
31+
```

__test__/index.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import request from 'supertest';
2+
import app from '../src/app';
3+
4+
it('return 200 on get base url', async () => {
5+
return request(app).get('/').expect(200);
6+
});

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: {
7+
esmodules: true,
8+
},
9+
},
10+
],
11+
],
12+
};

0 commit comments

Comments
 (0)