Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix filename
  • Loading branch information
mrazauskas committed May 9, 2022
commit ebd0bf8818292e4eedcbb2ec63520d596383f1de
6 changes: 3 additions & 3 deletions packages/jest-reporters/src/GitHubActionsReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class GitHubActionsReporter extends BaseReporter {
static readonly filename = __filename;

override onTestCaseResult(
test: Test,
_test: Test,
{failureMessages, ancestorTitles, title}: TestCaseResult,
): void {
failureMessages.forEach(failureMessage => {
Expand All @@ -38,14 +38,14 @@ export default class GitHubActionsReporter extends BaseReporter {
);

this.log(
`\n::error file=${test.path},line=${topFrame?.line},title=${errorTitle}::${errorMessage}`,
`\n::error file=${topFrame?.file},line=${topFrame?.line},title=${errorTitle}::${errorMessage}`,
);
});
}
}

// copied from: https://github.com/actions/toolkit/blob/main/packages/core/src/command.ts
function normalizeMessage(input: string): string {
// copied from: https://github.com/actions/toolkit/blob/main/packages/core/src/command.ts
const normalizedInput = input
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`passes test case report to '@actions/core' when a test has reference error 1`] = `
Array [
"
::error file=/user/project/__tests__/example.test.js:25:12,line=25,title=some test::ReferenceError: abc is not defined%0A%0A at Object.abc (__tests__/example.test.js:25:12)
::error file=/user/project/__tests__/example.test.js,line=25,title=some test::ReferenceError: abc is not defined%0A%0A at Object.abc (__tests__/example.test.js:25:12)
",
]
`;
Expand Down