test: don't require 'q' until the test that needs it (#20958)

this stops a failure to require from blocking all tests from running
This commit is contained in:
Jeremy Apthorp 2019-11-05 08:36:25 -08:00 committed by John Kleinschmidt
parent 56d6c1657a
commit 6e5ac301ce

View file

@ -46,9 +46,9 @@ describe('modules support', () => {
})
describe('q', () => {
const Q = require('q')
describe('Q.when', () => {
it('emits the fullfil callback', (done) => {
const Q = require('q')
Q(true).then((val: boolean) => {
expect(val).to.be.true()
done()