/** * All supported assertion names for the `should` function in url command * * @example * twd.url().should("contain.url", "/new-page"); * twd.url().should("eq", "http://localhost:3000/new-page"); */ export type URLAssertionName = 'eq' | 'contain.url'; /** * Negatable assertion names (e.g., 'not.have.text'). */ export type Negatable = T | `not.${T}`; /** * All assertion names, including negated ones. */ export type AnyURLAssertion = Negatable; export type URLCommandAPI = { location: Location; should: (name: AnyURLAssertion, value: string, retries?: number) => Promise; }; /** * Argument types for each assertion. */ export type URLAssertionArgs = { (name: 'contain.url', urlPart: string): URLCommandAPI; (name: 'not.contain.url', urlPart: string): URLCommandAPI; }; /** * URL command for assertions on the current URL. * @returns URLCommandAPI */ declare const urlCommand: () => URLCommandAPI; export default urlCommand;