mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
20 lines
584 B
JavaScript
20 lines
584 B
JavaScript
export function runFrontendTest(name) {
|
|
it(name, () => {
|
|
cy.window().then(win => {
|
|
return win.compilerExplorerFrontendTesting.run(name);
|
|
});
|
|
});
|
|
}
|
|
|
|
export function stubConsoleOutput(win) {
|
|
cy.stub(win.console, 'log').as('consoleLog');
|
|
cy.stub(win.console, 'warn').as('consoleWarn');
|
|
cy.stub(win.console, 'error').as('consoleError');
|
|
}
|
|
|
|
export function assertNoConsoleOutput() {
|
|
cy.get('@consoleLog').should('not.be.called');
|
|
cy.get('@consoleWarn').should('not.be.called');
|
|
cy.get('@consoleError').should('not.be.called');
|
|
}
|