Skip to content

fix: change jschardet to chardet #5265

fix: change jschardet to chardet

fix: change jschardet to chardet #5265

Triggered via pull request July 27, 2025 12:00
Status Failure
Total duration 2m 28s
Artifacts

pr-ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors
build
Process completed with exit code 1.
src/main/utils/__tests__/file.test.ts > file > readTextFileWithAutoEncoding > should try to fix bad detected encoding: src/main/utils/file.ts#L143
Error: [vitest] No "default" export is defined on the "chardet" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("chardet"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ Module.readTextFileWithAutoEncoding src/main/utils/file.ts:143:21 ❯ src/main/utils/__tests__/file.test.ts:296:22
src/main/utils/__tests__/file.test.ts > file > readTextFileWithAutoEncoding > should read file with auto encoding: src/main/utils/file.ts#L143
Error: [vitest] No "default" export is defined on the "chardet" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("chardet"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ Module.readTextFileWithAutoEncoding src/main/utils/file.ts:143:21 ❯ src/main/utils/__tests__/file.test.ts:269:22