Skip to content

Commit b0d0306

Browse files
committed
fix lint
1 parent f6b3801 commit b0d0306

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/__tests__/core.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { describe, expect, test, mock } from 'bun:test';
77
// or run tests in isolation.
88
// Actually, bun test runs each file in its own environment usually,
99
// BUT if we run multiple test files in one process, they might share the cache.
10+
const importFreshCore = (cacheKey: string) => import(`../core?${cacheKey}`);
1011

1112
describe('core info parsing', () => {
1213
test('should call error when currentVersionInfo is invalid JSON', async () => {
@@ -53,7 +54,7 @@ describe('core info parsing', () => {
5354

5455
// Use a unique query parameter to bypass cache if supported, or just rely on fresh environment per file.
5556
// In Bun, you can sometimes use a cache buster if it's dynamic import.
56-
await import('../core?error');
57+
await importFreshCore('error');
5758

5859
expect(mockError).toHaveBeenCalledWith(
5960
expect.stringContaining('error_parse_version_info')
@@ -95,7 +96,7 @@ describe('core info parsing', () => {
9596
emptyModule: {},
9697
}));
9798

98-
await import('../core?success');
99+
await importFreshCore('success');
99100

100101
expect(mockError).not.toHaveBeenCalled();
101102
});

src/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ export class Pushy {
362362
return server.backups;
363363
};
364364
downloadUpdate = async (
365-
info: CheckResult,
365+
updateInfo: CheckResult,
366366
onDownloadProgress?: (data: ProgressData) => void,
367367
) => {
368368
const {
@@ -374,15 +374,15 @@ export class Pushy {
374374
name,
375375
description = '',
376376
metaInfo,
377-
} = info;
377+
} = updateInfo;
378378
if (
379379
this.options.beforeDownloadUpdate &&
380-
(await this.options.beforeDownloadUpdate(info)) === false
380+
(await this.options.beforeDownloadUpdate(updateInfo)) === false
381381
) {
382382
log('beforeDownloadUpdate returned false, skipping download');
383383
return;
384384
}
385-
if (!info.update || !hash) {
385+
if (!updateInfo.update || !hash) {
386386
return;
387387
}
388388
if (rolledBackVersion === hash) {

0 commit comments

Comments
 (0)