ci: make console.warn work in tests (#18771)
This commit is contained in:
parent
390e7f5719
commit
29decbdd4d
3 changed files with 28 additions and 10 deletions
|
@ -32,6 +32,11 @@ describe('chromium feature', () => {
|
|||
listener = null
|
||||
})
|
||||
|
||||
afterEach(async () => {
|
||||
await closeWindow(w)
|
||||
w = null
|
||||
})
|
||||
|
||||
describe('command line switches', () => {
|
||||
describe('--lang switch', () => {
|
||||
const currentLocale = app.getLocale()
|
||||
|
@ -78,8 +83,6 @@ describe('chromium feature', () => {
|
|||
})
|
||||
})
|
||||
|
||||
afterEach(() => closeWindow(w).then(() => { w = null }))
|
||||
|
||||
describe('heap snapshot', () => {
|
||||
it('does not crash', function () {
|
||||
process.electronBinding('v8_util').takeHeapSnapshot()
|
||||
|
@ -1466,6 +1469,19 @@ describe('chromium feature', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describe('console functions', () => {
|
||||
it('should exist', () => {
|
||||
expect(console.log, 'log').to.be.a('function')
|
||||
expect(console.error, 'error').to.be.a('function')
|
||||
expect(console.warn, 'warn').to.be.a('function')
|
||||
expect(console.info, 'info').to.be.a('function')
|
||||
expect(console.debug, 'debug').to.be.a('function')
|
||||
expect(console.trace, 'trace').to.be.a('function')
|
||||
expect(console.time, 'time').to.be.a('function')
|
||||
expect(console.timeEnd, 'timeEnd').to.be.a('function')
|
||||
})
|
||||
})
|
||||
|
||||
describe('font fallback', () => {
|
||||
async function getRenderedFonts (html) {
|
||||
const w = new BrowserWindow({ show: false })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue