File size: 721 Bytes
71174bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { TestCmdList } from "./TestCmdList";
import { ITest } from "./TestInterfaces";

/**
 * Creates a test that will always fail. Useful as a placeholder during development.
 * 
 * @param {string} [message="TODO: Implement this test"] - Optional message to indicate why the test is failing
 * @returns {ITest} A test configuration that will always fail
 */
function createFailingTest(message = "TODO: Implement this test"): ITest {
    return {
        pluginOpen: () => new TestCmdList(),
        afterPluginCloses: () => new TestCmdList()
            .waitUntilRegex("#non-existent-element", message)
    };
}

// Convenience export for single failing test case
export const FailingTest: ITest = createFailingTest();