Skip to content

Commit 5e1d5cd

Browse files
committed
fix: resolve static and type-check regressions
Signed-off-by: Vitor Mattos <[email protected]>
1 parent 01f8957 commit 5e1d5cd

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

lib/Controller/AdminController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ private function generateCertificate(
225225
/**
226226
* Load certificate data
227227
*
228-
* Return all data of root certificate and a field called `generated` with a boolean value.
228+
* Return all data of the root certificate from the current engine.
229229
*
230-
* @return DataResponse<Http::STATUS_OK, LibresignCetificateDataGenerated, array{}>
230+
* @return DataResponse<Http::STATUS_OK, LibresignEngineHandler, array{}>
231231
*
232232
* 200: OK
233233
*/

src/tests/views/Preferences/Preferences.spec.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,13 @@ describe('Preferences view', () => {
402402
})
403403

404404
it('does not autosave preference updates before initialization finishes', async () => {
405-
let resolveFetchEffectivePolicies: (() => void) | null = null
406-
fetchEffectivePoliciesMock.mockImplementation(() => new Promise<void>((resolve) => {
407-
resolveFetchEffectivePolicies = resolve
408-
}))
405+
let resolveFetchEffectivePolicies: () => void = () => {}
406+
const pendingFetch = new Promise<void>((resolve) => {
407+
resolveFetchEffectivePolicies = () => {
408+
resolve()
409+
}
410+
})
411+
fetchEffectivePoliciesMock.mockImplementation(() => pendingFetch)
409412

410413
const wrapper = await createWrapper()
411414

@@ -415,7 +418,7 @@ describe('Preferences view', () => {
415418

416419
expect(saveUserPreferenceMock).not.toHaveBeenCalled()
417420

418-
resolveFetchEffectivePolicies?.()
421+
resolveFetchEffectivePolicies()
419422
await nextTick()
420423
await Promise.resolve()
421424

0 commit comments

Comments
 (0)