mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 22:18:27 +00:00
chore: Fix types in tests 38/N.
This commit is contained in:
@@ -126,7 +126,8 @@ function createErrnoError(code: string) {
|
||||
}
|
||||
|
||||
function mockWorkspaceStateRead(params: { onboardingCompletedAt?: string; errorCode?: string }) {
|
||||
mocks.fsReadFile.mockImplementation(async (filePath: string | URL | number) => {
|
||||
mocks.fsReadFile.mockImplementation(async (...args: unknown[]) => {
|
||||
const filePath = args[0];
|
||||
if (String(filePath).endsWith("workspace-state.json")) {
|
||||
if (params.errorCode) {
|
||||
throw createErrnoError(params.errorCode);
|
||||
|
||||
Reference in New Issue
Block a user