Skip to content

Commit

Permalink
Remove dead code and obsolete TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Nov 1, 2021
1 parent 6ed3ad1 commit af30e73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 3 additions & 7 deletions lib/glob-helpers.cjs
Expand Up @@ -97,13 +97,9 @@ function normalizeFileForMatching(cwd, file) {
file = slash(file);
}

if (!cwd) { // TODO: Ensure tests provide an actual value.
return file;
}

// TODO: If `file` is outside `cwd` we can't normalize it. Need to figure
// out if that's a real-world scenario, but we may have to ensure the file
// isn't even selected.
// Note that if `file` is outside `cwd` we can't normalize it. If this turns
// out to be a real-world scenario we may have to make changes in calling code
// to make sure the file isn't even selected for matching.
if (!file.startsWith(cwd)) {
return file;
}
Expand Down
2 changes: 0 additions & 2 deletions lib/worker/base.js
Expand Up @@ -39,8 +39,6 @@ const run = async options => {
process.exit(); // eslint-disable-line unicorn/no-process-exit
}

// TODO: Initialize providers here, then pass to lineNumberSelection() so they
// can be used to parse the test file.
let checkSelectedByLineNumbers;
try {
checkSelectedByLineNumbers = lineNumberSelection({
Expand Down
2 changes: 1 addition & 1 deletion test/snapshot-regenerate-report/test.js
Expand Up @@ -37,7 +37,7 @@ test('snapshot report can be regenerated from .snap file', async t => {
});

// Regenerate report
snapshots.hasChanges = true; // TODO this is a hack
snapshots.hasChanges = true; // Force.
snapshots.save();

// Assert that reports match
Expand Down

0 comments on commit af30e73

Please sign in to comment.