mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 07:04:04 -05:00
This adds some unit tests for the front end. - configures "frontend tests" as a unit tests in `static/tests`, removing the old cypress-requiring "unit" tests - hack enough of a DOM to get things working - port motd and id tests - *adds* a golden layout checks (see #7807) - Updates READMEs etc --------- Co-authored-by: Claude <noreply@anthropic.com>
14 lines
450 B
TypeScript
14 lines
450 B
TypeScript
import '../../static/global';
|
|
|
|
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');
|
|
}
|