Skip to content

Commit

Permalink
test(vite-plugin): Make sure console.warn is not called
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufkandemir authored May 9, 2023
1 parent 891f5d3 commit 71c96cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vite-plugin/test/cypress/script-transform.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ const types = [

describe('Script Transform', () => {
beforeEach(() => {
cy.visit('/')
cy.visit('/', {
onBeforeLoad (win) {
cy.spy(win.console, 'warn').as('consoleWarn')
}
})

cy.get('@consoleWarn').should('not.have.been.called')
})

it('should transform <script setup> correctly', () => {
Expand Down

0 comments on commit 71c96cf

Please sign in to comment.