How to use jest-serializer - 2 common examples

To help you get started, we’ve selected a few jest-serializer 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 facebook / metro / packages / metro-cache / src / stores / PersistedMapStore.js View on Github external
_getMap() {
    if (!this._map) {
      if (fs.existsSync(this._path)) {
        this._map = serializer.readFileSync(this._path);
      } else {
        this._map = new Map();
      }
    }
  }
github facebook / metro / packages / metro-cache / src / stores / PersistedMapStore.js View on Github external
_store() {
    serializer.writeFileSync(this._path, this._map);
    this._timeout = null;
  }
}

jest-serializer

> DEPRECATED: Use `v8` APIs directly: https://nodejs.org/api/v8.html#serialization-api

MIT
Latest version published 2 years ago

Package Health Score

72 / 100
Full package analysis

Similar packages