title: jest: how to test multiple functions in one file?
body: <p>is there a way to test multiple functions in one file with jest?</p>
  
  <p>in ch03.js:  </p>
  
  <pre><code>var min = function(a, b) {
    if(a &lt; b)
      return a
    else
      return b
  }
  
  // even/odd number checker
  
  var isEven = function(number) {
    n = Math.abs(number);
    if (n==0)
      return true;
    else if (n==1)
      return false;
    else {
      return isEven(n-2);
    }
  }
  
  module.exports = isEven;
  </code></pre>
  
  <p>and my test file:
  in <strong>test</strong>/ch03-test.js</p>
  
  <pre><code>jest.dontMock('../ch03');
  
  describe('min', function() {
    it('returns the minimum of two numbers', function() {
      var min = require('../ch03');
      expect(min(2, 3)).toBe(2);
      expect(min(22, 3)).toBe(3);
      expect(min(2, -3)).toBe(-3);
    });
  });
  
  describe('isEven', function() {
    it('checks if given number is even', function() {
      var isEven = require('../ch03');
      expect(isEven(0)).toBe(true);
      expect(isEven(-2)).toBe(true);
      expect(isEven(0)).toBe(true);
      expect(isEven(3)).toBe(false);
    });
  });
  </code></pre>
  
  <p>I don't want separate files for every small javascript function.
  Is there a way to test multiple functions in one file?</p>