bolt-test.ts: Make a few names more descriptive
This commit is contained in:
parent
79d8f4b41b
commit
c7a01621b6
1 changed files with 6 additions and 6 deletions
|
@ -288,17 +288,17 @@ function* loadTests(filepath: string): IterableIterator<Test> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function findSnapshot(name: string): string | null {
|
function findSnapshot(ref: string): string | null {
|
||||||
|
|
||||||
// If `name` directly refers to a snapshot, we don't have any more work to do.
|
// If `name` directly refers to a snapshot, we don't have any more work to do.
|
||||||
if (fs.existsSync(path.join(STORAGE_DIR, 'snapshots', name))) {
|
if (fs.existsSync(path.join(STORAGE_DIR, 'snapshots', ref))) {
|
||||||
return name;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to read an alias, returning early if it was indeed found
|
// Try to read an alias, returning early if it was indeed found
|
||||||
const ref = tryReadFileSync(path.join(STORAGE_DIR, 'aliases', name));
|
const snapshotKey = tryReadFileSync(path.join(STORAGE_DIR, 'aliases', ref));
|
||||||
if (ref !== null) {
|
if (snapshotKey !== null) {
|
||||||
return ref;
|
return snapshotKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't support any more refs at the moment, so we indicate failure
|
// We don't support any more refs at the moment, so we indicate failure
|
||||||
|
|
Loading…
Reference in a new issue