printJestWarning.js 745 B

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