Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add jest config and export main.js
  • Loading branch information
Thomas Hughes committed Sep 20, 2019
1 parent 97fca7f commit e87cc39
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dist/index.js
Expand Up @@ -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);
Expand Down Expand Up @@ -426,7 +426,11 @@ async function run() {
}
}

run();
module.exports = run;

if (require.main === require.cache[eval('__filename')]) {
run();
}


/***/ }),
Expand Down
14 changes: 14 additions & 0 deletions package.json
Expand Up @@ -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
}
}
}
}
6 changes: 5 additions & 1 deletion src/main.js
Expand Up @@ -44,4 +44,8 @@ async function run() {
}
}

run();
module.exports = run;

if (require.main === module) {
run();
}
6 changes: 5 additions & 1 deletion tests/main.test.js
@@ -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 () => {});
});

0 comments on commit e87cc39

Please sign in to comment.