Add jest config and export main.js

This commit is contained in:
Thomas Hughes 2019-09-20 15:29:25 -05:00
parent 97fca7f8d6
commit e87cc39944
No known key found for this signature in database
GPG Key ID: B2D8646423EF5814
4 changed files with 30 additions and 4 deletions

8
dist/index.js vendored
View File

@ -378,7 +378,7 @@ module.exports._enoent = enoent;
/***/ }),
/***/ 31:
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
/***/ (function(module, __unusedexports, __webpack_require__) {
const core = __webpack_require__(470);
const { GitHub, context } = __webpack_require__(469);
@ -426,7 +426,11 @@ async function run() {
}
}
run();
module.exports = run;
if (require.main === require.cache[eval('__filename')]) {
run();
}
/***/ }),

View File

@ -36,5 +36,19 @@
"jest": "^24.8.0",
"prettier": "^1.16.4",
"husky": "^3.0.5"
},
"jest": {
"testEnvironment": "node",
"collectCoverageFrom": [
"src/main.js"
],
"coverageThreshold": {
"global": {
"branches": 80,
"functions": 80,
"lines": 80,
"statements": 80
}
}
}
}

View File

@ -44,4 +44,8 @@ async function run() {
}
}
run();
module.exports = run;
if (require.main === module) {
run();
}

View File

@ -1,2 +1,6 @@
/* eslint-disable no-undef */
test('that tests work', () => {});
describe('Create release', () => {
test('Create release endpoint is called', async () => {});
test('Outputs are set', async () => {});
});