Skip to content

Commit

Permalink
Test out creating failed test annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
xt0rted committed Sep 24, 2020
1 parent 93f567c commit 71940b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
19 changes: 13 additions & 6 deletions e2e/automated.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,21 @@ describe('End to End tests', () => {
});

describe('single blob', () => {
fixtures.forEach(({ url, content, lineNumber, targetUrl }) => {
fixtures.forEach(({ url, file, content, lineNumber, targetUrl }) => {
it(`resolves ${content} to ${targetUrl}`, async () => {
if (lineNumber) {
await executeTest(
url,
targetUrl,
`#LC${lineNumber} .octolinker-link`,
);
try {
await executeTest(
url,
targetUrl,
`#LC${lineNumber} .octolinker-link`,
);
} catch (ex) {
process.stdout.write(
`\n::error file=${file},line=${lineNumber}::${ex.message}\n`,
);
throw ex;
}
} else {
await executeTest(
url,
Expand Down
1 change: 1 addition & 0 deletions e2e/generate-fixtures-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function findTests(contents) {

memo.push({
url: `${fixturesRoot}${filePath}`,
file: `e2e${filePath}`,
content: lines[index + 1].trim(),
targetUrl,
lineNumber,
Expand Down

0 comments on commit 71940b7

Please sign in to comment.