Skip to content

Commit

Permalink
chore(cli): address a few lint issues in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2022
1 parent 79e6c1e commit b76846b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@sanity/cli/test/shared/describe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import {cliUserToken, hasBuiltCli} from './environment'

// From jest typings, not exposed by jest
interface DoneCallback {
(...args: any[]): any
fail(error?: string | {message: string}): any
(...args: unknown[]): unknown
fail(error?: string | {message: string}): unknown
}

type ProvidesCallback = ((cb: DoneCallback) => void | undefined) | (() => Promise<unknown>)
Expand All @@ -12,7 +12,7 @@ type ProvidesCallback = ((cb: DoneCallback) => void | undefined) | (() => Promis
export const describeCliTest = cliUserToken && hasBuiltCli ? describe : describe.skip

// test.concurrent() runs even if the parent describe is skipped, so we need to wrap it as well
export const testConcurrent = (name: string, testFn: ProvidesCallback, timeout = 30000) => {
export const testConcurrent = (name: string, testFn: ProvidesCallback, timeout = 30000): void => {
const tester = cliUserToken && hasBuiltCli ? test.concurrent : test.concurrent.skip
return tester(name, testFn, timeout)
}

0 comments on commit b76846b

Please sign in to comment.