test: check actual output generated from printToPDF (#21949)

This commit is contained in:
Shelley Vohr 2020-01-30 20:12:35 +00:00 committed by GitHub
parent 1f61b3a3eb
commit 23382e6e08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1432 additions and 1 deletions

View file

@ -2,11 +2,18 @@ import { expect } from 'chai'
import { deprecate } from 'electron'
describe('deprecate', () => {
let throwing: boolean
beforeEach(() => {
throwing = process.throwDeprecation
deprecate.setHandler(null)
process.throwDeprecation = true
})
afterEach(() => {
process.throwDeprecation = throwing
})
it('allows a deprecation handler function to be specified', () => {
const messages: string[] = []