-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from bvandercar-vt/bvandercar/more-constants
refactor: more constants, improved types
- Loading branch information
Showing
29 changed files
with
376 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ test | |
*.png | ||
src/**/*.ts | ||
!src/**/*.d.ts | ||
*.internal.* | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
declare namespace Cypress { | ||
import {Log as CtrLog} from "./src/installLogsCollector"; | ||
import type {Log} from "./src/installLogsCollector"; | ||
import type {BuiltinOutputProcessorsTypes} from "./src/types"; | ||
|
||
interface Cypress { | ||
TerminalReport: { | ||
getLogs<T extends 'txt' | 'json' | 'none' = 'none'>(format?: T): { | ||
txt: string, | ||
json: string, | ||
none: CtrLog[], | ||
}[T]; | ||
getLogs(format: BuiltinOutputProcessorsTypes): string | null; | ||
getLogs(format?: 'none' = 'none'): Log[] | null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* This file used for internally adding types to package interfaces that are not | ||
* documented by the package (not included in the package's types). | ||
*/ | ||
|
||
declare namespace Cypress { | ||
interface Cypress { | ||
onSpecReady(...args: any[]): void; | ||
|
||
mocha: { | ||
getRunner(): Mocha.Runner | ||
getRootSuite(): Mocha.Suite | ||
} | ||
|
||
state(key: 'done', callback: (error: Error) => Promise<void>): void | ||
state(key: 'error', error: Error): void | ||
} | ||
|
||
interface Chainable<Subject = any> extends Pick<Promise<Subject>, 'catch'> { | ||
} | ||
} | ||
|
||
declare namespace Mocha { | ||
interface InvocationDetails { | ||
relativeFile?: string | ||
fileUrl?: string | ||
} | ||
|
||
interface Hook { | ||
hookName: string | ||
_ctr_hook: boolean | ||
} | ||
|
||
interface Runnable { | ||
hookName: string | ||
invocationDetails: InvocationDetails | ||
id: string | ||
order: unknown | ||
wallClockStartedAt: unknown | ||
timings: unknown | ||
} | ||
|
||
interface Suite { | ||
invocationDetails: InvocationDetails | ||
} | ||
|
||
interface Test { | ||
failedFromHookId?: unknown | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.