* Checks snapshot valid. * @param {Snapshot} snapshot the snapshot made * @param {CheckSnapshotValidCallback} callback callback function * @returns {void}
(snapshot, callback)
| 3059 | * @returns {void} |
| 3060 | */ |
| 3061 | checkSnapshotValid(snapshot, callback) { |
| 3062 | const cachedResult = this._snapshotCache.get(snapshot); |
| 3063 | if (cachedResult !== undefined) { |
| 3064 | this._statTestedSnapshotsCached++; |
| 3065 | if (typeof cachedResult === class="st">"boolean") { |
| 3066 | callback(null, cachedResult); |
| 3067 | } else { |
| 3068 | cachedResult.push(callback); |
| 3069 | } |
| 3070 | return; |
| 3071 | } |
| 3072 | this._statTestedSnapshotsNotCached++; |
| 3073 | this._checkSnapshotValidNoCache(snapshot, callback); |
| 3074 | } |
| 3075 | |
| 3076 | /** |
| 3077 | * Check snapshot valid no cache. |
no test coverage detected