How to use the grim.clearDeprecations function in grim

To help you get started, we’ve selected a few grim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nylas-mail-lives / nylas-mail / spec / spec-helper.es6 View on Github external
beforeEach(function() {
  NylasEnv.testOrganizationUnit = null;
  if (isCoreSpec) { Grim.clearDeprecations(); }
  ComponentRegistry._clear();
  global.localStorage.clear();

  DatabaseStore._transactionQueue = undefined;

  //# If we don't spy on DatabaseStore._query, then
  //`DatabaseStore.inTransaction` will never complete and cause all tests
  //that depend on transactions to hang.
  //
  // @_query("BEGIN IMMEDIATE TRANSACTION") never resolves because
  // DatabaseStore._query never runs because the @_open flag is always
  // false because we never setup the DB when `NylasEnv.inSpecMode` is
  // true.
  spyOn(DatabaseStore, '_query').andCallFake(() => Promise.resolve([]));

  TaskQueue._queue = [];
github atom / atom / src / task-bootstrap.js View on Github external
return Grim.on('updated', function() {
    const deprecations = Grim.getDeprecations().map(deprecation =>
      deprecation.serialize()
    );
    Grim.clearDeprecations();
    return global.emit('task:deprecations', deprecations);
  });
};

grim

Log usage of deprecated methods

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis