molmoda / data /src /Testing /FailingTest.ts
introvoyz041's picture
Migrated from GitHub
71174bc verified
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();