blob: d72e50cc5692956a3096a1df8d64aef78c37ea1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import '../../static/global';
export function runFrontendTest(name: string) {
it(name, () => {
return cy.window().then(win => {
return win.compilerExplorerFrontendTesting.run(name);
});
});
}
export function stubConsoleOutput(win: Cypress.AUTWindow) {
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');
}
|