All files / mongoose/lib/helpers printJestWarning.js

33.33% Statements 2/6
20% Branches 2/10
100% Functions 0/0
33.33% Lines 2/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22    1x   1x                                  
'use strict';
 
const utils = require('../utils');
 
Iif (typeof jest !== 'undefined' && !process.env.SUPPRESS_JEST_WARNINGS) {
  if (typeof window !== 'undefined') {
    utils.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' +
      'with Jest\'s default jsdom test environment. Please make sure you read ' +
      'Mongoose\'s docs on configuring Jest to test Node.js apps: ' +
      'https://mongoosejs.com/docs/jest.html. Set the SUPPRESS_JEST_WARNINGS to true ' +
      'to hide this warning.');
  }
 
  if (setTimeout.clock != null && typeof setTimeout.clock.Date === 'function') {
    utils.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' +
      'with Jest\'s mock timers enabled. Please make sure you read ' +
      'Mongoose\'s docs on configuring Jest to test Node.js apps: ' +
      'https://mongoosejs.com/docs/jest.html. Set the SUPPRESS_JEST_WARNINGS to true ' +
      'to hide this warning.');
  }
}