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
bang
  • Loading branch information
SimenB committed Dec 29, 2023
commit 8fc5a1a2836802f9e1ee99310200094a5f2cae58
2 changes: 1 addition & 1 deletion packages/jest-reporters/src/GitHubActionsReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default class GitHubActionsReporter extends BaseReporter {
): ResultTreeNode {
const node: ResultTreeNode = {
children: [],
name: ancestors.at(-1),
name: ancestors.at(-1)!,
passed: true,
};
const branches: Array<Array<string>> = [];
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/src/dedentLines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const dedentMarkup = (input: Array<string>, output: Array<string>): boolean => {
return false; // because text has more than one adjacent line
}

const indentationLengthOfTag = stack.at(-1);
const indentationLengthOfTag = stack.at(-1)!;
output.push(line.slice(indentationLengthOfTag + 2));
isText = true;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function stripAddedIndentation(inlineSnapshot: string) {
return inlineSnapshot;
}

if (lines[0].trim() !== '' || lines.at(-1).trim() !== '') {
if (lines[0].trim() !== '' || lines.at(-1)!.trim() !== '') {
// If not blank first and last lines, abort.
return inlineSnapshot;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export const processPrettierAst = (
return;
}

const parent = ancestors.at(-1).node;
const parent = ancestors.at(-1)!.node;
const startColumn =
isAwaitExpression(parent) && parent.loc
? parent.loc.start.column
Expand Down