Browse Source

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

this stops a failure to require from blocking all tests from running
Jeremy Apthorp 5 years ago
parent
commit
6e5ac301ce
1 changed files with 1 additions and 1 deletions
  1. 1 1
      spec-main/modules-spec.ts

+ 1 - 1
spec-main/modules-spec.ts

@@ -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()