Skip to content

Commit a73aa77

Browse files
committed
ci: remove npm caching
test: add log for debugging
1 parent 35246fa commit a73aa77

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
node-version: ${{ matrix.node-version }}
27-
cache: 'npm'
2827
- run: npm ci
2928
- run: npm run lint
30-
- run: npm run build --if-present
29+
- run: npm run build
3130
- run: npm test

test/index.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ describe('`imgdl`', () => {
112112

113113
it('should not throw any error if one of the URLs is invalid, call onError instead', async () => {
114114
const urls = [`${BASE_URL}/img-1.jpg`, `${BASE_URL}/unknown`];
115-
const onError = vi.fn<Parameters<OnError>>();
115+
const onError = vi
116+
.fn<Parameters<OnError>>()
117+
.mockImplementation((err, url) => console.log(url, err.message));
116118

117119
await expect(imgdl(urls, { directory, onError })).resolves.toHaveLength(1);
118120
expect(onError).toHaveBeenCalledTimes(1);

0 commit comments

Comments
 (0)