title: How to use should.js as global variable:
body: <p>I am trying to write some unit test that using mocha and should.js since I would like to keep format for each of my unit test the same and each unit test require should.js to verify proerpty of object. How can I make it as globally variable so I do not need to require should.js on each test file so far I have tried</p>
  
  <pre><code>global.should = require('should');
  describe('try gloabl'), () =&gt; {
    it('should work'), () =&gt; {
      let user = { name: 'test'};
      global.should(user).have.property('name', 'test');
    });
  });
  #error, global.should is not a function
  </code></pre>
  
  <p>and if i use this. it works</p>
  
  <pre><code>const should = require('should');
  should = require('should');
  describe('try gloabl'), () =&gt; {
    it('should work'), () =&gt; {
      let user = { name: 'test'};
      global.should(user).have.property('name', 'test');
    });
  });
  </code></pre>