This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -50,6 +50,8 @@ class SnapshotState {
_defineProperty(this, '_snapshotData', void 0);
_defineProperty(this, '_initialData', void 0);
_defineProperty(this, '_snapshotPath', void 0);
_defineProperty(this, '_inlineSnapshots', void 0);
@@ -79,6 +81,7 @@ class SnapshotState {
data = _getSnapshotData.data,
dirty = _getSnapshotData.dirty;
this._initialData = data;
this._snapshotData = data;
this._dirty = dirty;
this._getBabelTraverse = options.getBabelTraverse;
@@ -126,6 +129,17 @@ class SnapshotState {
}
}
clear() {
this._snapshotData = this._initialData;
this._inlineSnapshots = [];
this._counters = new Map();
this._index = 0;
this.added = 0;
this.matched = 0;
this.unmatched = 0;
this.updated = 0;
}
save() {
const hasExternalSnapshots = Object.keys(this._snapshotData).length;
const hasInlineSnapshots = this._inlineSnapshots.length;