printJestWarning.js 713 B

123456789101112131415
  1. 'use strict';
  2. if (typeof jest !== 'undefined' && typeof window !== 'undefined') {
  3. console.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' +
  4. 'with Jest\'s default jsdom test environment. Please make sure you read ' +
  5. 'Mongoose\'s docs on configuring Jest to test Node.js apps: ' +
  6. 'http://mongoosejs.com/docs/jest.html');
  7. }
  8. if (typeof jest !== 'undefined' && process.nextTick.toString().indexOf('nextTick') === -1) {
  9. console.warn('Mongoose: looks like you\'re trying to test a Mongoose app ' +
  10. 'with Jest\'s mock timers enabled. Please make sure you read ' +
  11. 'Mongoose\'s docs on configuring Jest to test Node.js apps: ' +
  12. 'http://mongoosejs.com/docs/jest.html');
  13. }