@magnit-ce/code-tests 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,58 +0,0 @@
1
- declare class TestPromise<T> extends Promise<T> {
2
- toBeDefined(valueName?: string): Promise<void>;
3
- toBe(value: any, exact?: boolean): Promise<void>;
4
- toContainText(value: string): Promise<void>;
5
- toHaveAttribute(value: string): Promise<void>;
6
- }
7
- declare class CodeTests {
8
- #private;
9
- static timeoutMS: number;
10
- static expect<T>(value: T): TestPromise<T>;
11
- static expectSync<T>(value: T): TestPromise<T>;
12
- static expectBefore<T>(value: T): TestPromise<T>;
13
- static prompt(host: CodeTestsElement, parent: HTMLElement, message: string, options?: PromptOptions): Promise<boolean>;
14
- static createElementFromTemplate(target: string | HTMLTemplateElement, parent?: HTMLElement): HTMLElement;
15
- }
16
- declare function expect(value: any): TestPromise<any>;
17
- type PromptOptions = {
18
- acceptLabel?: string;
19
- rejectLabel?: string;
20
- onAccept?: () => void;
21
- onReject?: () => void;
22
- };
23
- declare function prompt(host: CodeTestsElement, parent: HTMLElement, message: string, options?: PromptOptions): Promise<boolean>;
24
-
25
- type CodeTestsProperties = {};
26
- declare enum HookType {
27
- BeforeAll = "beforeall",
28
- AfterAll = "afterall",
29
- BeforeEach = "beforeeach",
30
- AfterEach = "aftereach",
31
- RequiredBeforeAny = "requiredbeforeany",
32
- RequiredAfterAny = "requiredafterany"
33
- }
34
- declare enum CodeTestEventType {
35
- BeforeAll = "beforeall",
36
- AfterAll = "afterall",
37
- BeforeTest = "beforetest",
38
- AfterTest = "aftertest",
39
- Cancel = "cancel"
40
- }
41
- declare class CodeTestsElement extends HTMLElement {
42
- #private;
43
- componentParts: Map<string, HTMLElement>;
44
- getElement<T extends HTMLElement = HTMLElement>(id: string): T;
45
- findElement<T extends HTMLElement = HTMLElement>(id: string): T;
46
- constructor();
47
- connectedCallback(): void;
48
- disconnectedCallback(): void;
49
- loadTests(testsPath?: string): Promise<void>;
50
- isCanceled: boolean;
51
- cancel(): void;
52
- runTests(): Promise<void>;
53
- static create(properties: CodeTestsProperties): HTMLElement;
54
- static observedAttributes: string[];
55
- attributeChangedCallback(attributeName: string, oldValue: string, newValue: string): void;
56
- }
57
-
58
- export { CodeTestEventType, CodeTests, CodeTestsElement, type CodeTestsProperties, HookType, expect, prompt };