Skip to content

Commit 19a84a2

Browse files
authored
Merge pull request #11 from manwaring/unit-tests
start adding unit tests
2 parents 92da3c2 + 9dce817 commit 19a84a2

36 files changed

+1029
-163
lines changed

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
__mocks__
12
.circleci/
23
.dependabot/
3-
.nyc_output/
44
coverage/
5-
dist/mock-data/
65
dist/*.test*
76
examples/
87
src/
8+
.babelrc.js
99
.prettierrc.yml
1010
.gitignore
1111
.npmignore
1212
.publishrc
13-
cucumber.js
13+
jest.config.js
1414
tsconfig.*json

__mocks__/@iopipe/iopipe.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const iopipe = jest.genMockFromModule('@iopipe/iopipe');
2+
3+
// @ts-ignore
4+
iopipe.label = function(key: string) {};
5+
6+
// @ts-ignore
7+
iopipe.metric = function(key: string, value: string) {};
8+
9+
module.exports = iopipe;

__mocks__/epsagon.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const epsagon = jest.genMockFromModule('epsagon');
2+
3+
// @ts-ignore
4+
epsagon.label = function(key: string) {};
5+
6+
module.exports = epsagon;

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
collectCoverageFrom: ['src/**/*.ts', '!src/**/*index.ts']
3+
};

0 commit comments

Comments
 (0)