Skip to content

Commit 6fb4137

Browse files
committed
Add travis and one generic test
1 parent b0cdefd commit 6fb4137

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.travis

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
directories:
5+
- node_modules
6+
notifications:
7+
email: true
8+
node_js:
9+
- 10
10+
- 9
11+
- 8
12+
before_install:
13+
- npm install -g npm@latest
14+
before_script:
15+
- npm prune
16+
script:
17+
- npm run test
18+
after_success:
19+
- npm run coveralls

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@
5555
"json",
5656
"ts"
5757
],
58-
"rootDir": "src",
58+
"rootDir": "tests",
5959
"testRegex": ".spec.ts$",
6060
"transform": {
6161
"^.+\\.(t|j)s$": "ts-jest"
6262
},
63-
"coverageDirectory": "./coverage"
63+
"coverageDirectory": "./coverage",
64+
"testEnvironment": "node"
6465
},
6566
"bugs": {
6667
"url": "https://github.com/GenFirst/nest-status-monitor/issues"

tests/setup.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
describe('Component', () => {
2+
it('should be able to run tests', () => {
3+
expect(1 + 2).toEqual(3);
4+
});
5+
});

0 commit comments

Comments
 (0)