diff --git a/__tests__/backend/utils/DriveBackedValue.test.ts b/__tests__/backend/utils/DriveBackedValue.test.ts index 06bbe77f..a9adc4cf 100644 --- a/__tests__/backend/utils/DriveBackedValue.test.ts +++ b/__tests__/backend/utils/DriveBackedValue.test.ts @@ -305,10 +305,7 @@ test("DriveBackedValue loads a value - the folder exists, the value exists", () ], }; const driveServiceMock = mockedSafeDriveService(); - driveServiceMock.Files.get.mockReturnValueOnce( - // Incorrect upstream typings, string is actually permissible - JSON.stringify("VALUE") as unknown as GoogleAppsScript.Drive.Schema.File, - ); + driveServiceMock.Files.get.mockReturnValueOnce(JSON.stringify("VALUE")); driveServiceMock.Files.list .mockReturnValueOnce(response1) .mockReturnValueOnce(response2); diff --git a/__tests__/test-utils/gas-stubs.ts b/__tests__/test-utils/gas-stubs.ts index 391e49a2..95c939d7 100644 --- a/__tests__/test-utils/gas-stubs.ts +++ b/__tests__/test-utils/gas-stubs.ts @@ -135,7 +135,18 @@ export function mockedFilesCollection(): GoogleAppsScript.Drive.Collection.Files emptyTrash: jest.fn<() => void>(), export: jest.fn<(fileId: string, mimeType: string) => void>(), generateIds: jest.fn<() => GoogleAppsScript.Drive.Schema.GeneratedIds>(), - get: jest.fn<(fileId: string) => GoogleAppsScript.Drive.Schema.File>(), + get: jest.fn() as { + ( + fileId: string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- From upstream types + optionalArgs?: Record & { alt: "media" }, + ): string; + ( + fileId: string, + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- From upstream types + optionalArgs?: Record, + ): GoogleAppsScript.Drive.Schema.File; + }, insert: jest.fn< ( diff --git a/package-lock.json b/package-lock.json index b591f6f7..0f56c4a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@smui/linear-progress": "^7.0.0", "@smui/list": "^7.0.0", "@smui/top-app-bar": "^7.0.0", - "@types/google-apps-script": "^1.0.86", + "@types/google-apps-script": "^1.0.89", "@types/google.script.client-side": "^0.1.5", "@types/jest": "^29.5.14", "@types/node": "^22.9.3", @@ -4077,9 +4077,9 @@ } }, "node_modules/@types/google-apps-script": { - "version": "1.0.86", - "resolved": "https://registry.npmjs.org/@types/google-apps-script/-/google-apps-script-1.0.86.tgz", - "integrity": "sha512-w0tLty8vpApjIp+czorfcoY9k1nZSdQsg6lru3ZV6EWdNyXNsetIZPQnvBIihENAhcGwlogiDKx8z/57NYB3jA==", + "version": "1.0.89", + "resolved": "https://registry.npmjs.org/@types/google-apps-script/-/google-apps-script-1.0.89.tgz", + "integrity": "sha512-Vbvuyno3JnmFDwt4gOLSZKg3/EKLyViVhGqDt1oowY19M1x7Tl1sxOMSnAPdVGH5X/k2pcDWAh+poNaU8Jxwkw==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index c4430807..29f35ceb 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@smui/linear-progress": "^7.0.0", "@smui/list": "^7.0.0", "@smui/top-app-bar": "^7.0.0", - "@types/google-apps-script": "^1.0.86", + "@types/google-apps-script": "^1.0.89", "@types/google.script.client-side": "^0.1.5", "@types/jest": "^29.5.14", "@types/node": "^22.9.3",