Skip to content

Commit

Permalink
use relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
mattallty committed Apr 20, 2020
1 parent 3d5e893 commit c12b92e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
23 changes: 11 additions & 12 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ const flatMap = __webpack_require__(537)
const map = __webpack_require__(410)
const filter = __webpack_require__(831)

const RESULTS_FILE = "jest.results.json"
const RESULTS_FILE = "./jest.results.json"
const CWD = process.cwd() + path.sep

// most @actions toolkit packages have async methods
Expand All @@ -1345,12 +1345,12 @@ async function run() {
await exec.exec(cmd)
console.log("Jest command executed")
} catch (e) {
console.error("Error while executing jest", e)
console.error(e.stack)
console.error("Error while executing jest. Looks like some tests failed.")
console.error(e)
// Some errors should be reported
}

const results = __webpack_require__(306)
const results = __webpack_require__(962)

if (results.success && !reportOnSuccess) {
console.log("Skipping reporting success")
Expand Down Expand Up @@ -5755,13 +5755,7 @@ exports.paginateRest = paginateRest;
/* 303 */,
/* 304 */,
/* 305 */,
/* 306 */
/***/ (function() {

eval("require")("jest.results.json");


/***/ }),
/* 306 */,
/* 307 */,
/* 308 */,
/* 309 */,
Expand Down Expand Up @@ -30937,7 +30931,12 @@ module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd,
/* 959 */,
/* 960 */,
/* 961 */,
/* 962 */,
/* 962 */
/***/ (function(module) {

module.exports = {"numFailedTestSuites":1,"numFailedTests":1,"numPassedTestSuites":1,"numPassedTests":2,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":2,"numTotalTests":3,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesRemovedList":[],"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1587394751897,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":["Other suite"],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoBe\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // Object.is equality\u001b[22m\n\nExpected: \u001b[32m2\u001b[39m\nReceived: \u001b[31m1\u001b[39m\n at Object.toBe (/Volumes/Home/matt/dev/jest-github-action/other.test.js:3:15)\n at Object.asyncJestTest (/Volumes/Home/matt/dev/jest-github-action/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)\n at /Volumes/Home/matt/dev/jest-github-action/node_modules/jest-jasmine2/build/queueRunner.js:43:12\n at new Promise (<anonymous>)\n at mapper (/Volumes/Home/matt/dev/jest-github-action/node_modules/jest-jasmine2/build/queueRunner.js:26:19)\n at /Volumes/Home/matt/dev/jest-github-action/node_modules/jest-jasmine2/build/queueRunner.js:73:41\n at processTicksAndRejections (internal/process/task_queues.js:97:5)"],"fullName":"Other suite should fail","location":{"column":2,"line":2},"status":"failed","title":"should fail"}],"endTime":1587394752262,"message":"\u001b[1m\u001b[31m \u001b[1m● \u001b[1mOther suite › should fail\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoBe\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // Object.is equality\u001b[22m\n\n Expected: \u001b[32m2\u001b[39m\n Received: \u001b[31m1\u001b[39m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 1 | \u001b[39mdescribe(\u001b[32m\"Other suite\"\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 2 | \u001b[39m it(\u001b[32m\"should fail\"\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 3 | \u001b[39m expect(\u001b[35m1\u001b[39m)\u001b[33m.\u001b[39mtoBe(\u001b[35m2\u001b[39m)\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 4 | \u001b[39m })\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 5 | \u001b[39m})\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 6 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toBe (\u001b[2m\u001b[0m\u001b[36mother.test.js\u001b[39m\u001b[0m\u001b[2m:3:15)\u001b[2m\u001b[22m\n","name":"/Volumes/Home/matt/dev/jest-github-action/other.test.js","startTime":1587394751921,"status":"failed","summary":""},{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"throws invalid number","location":{"column":1,"line":4},"status":"passed","title":"throws invalid number"},{"ancestorTitles":[],"failureMessages":[],"fullName":"wait 500 ms","location":{"column":1,"line":8},"status":"passed","title":"wait 500 ms"}],"endTime":1587394752660,"message":"","name":"/Volumes/Home/matt/dev/jest-github-action/index.test.js","startTime":1587394752267,"status":"passed","summary":""}],"wasInterrupted":false};

/***/ }),
/* 963 */,
/* 964 */,
/* 965 */,
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const flatMap = require("lodash/flatMap")
const map = require("lodash/map")
const filter = require("lodash/filter")

const RESULTS_FILE = "jest.results.json"
const RESULTS_FILE = "./jest.results.json"
const CWD = process.cwd() + path.sep

// most @actions toolkit packages have async methods
Expand All @@ -33,8 +33,8 @@ async function run() {
await exec.exec(cmd)
console.log("Jest command executed")
} catch (e) {
console.error("Error while executing jest", e)
console.error(e.stack)
console.error("Error while executing jest. Looks like some tests failed.")
console.error(e)
// Some errors should be reported
}

Expand Down

0 comments on commit c12b92e

Please sign in to comment.