Skip to content

Commit 04911a9

Browse files
authored
Merge pull request #264 from parthlambdatest/Dot-5015
[Dot-5015] send entire global cache if global cache is used
2 parents 2c89f7c + 88a4d5c commit 04911a9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.1.7-beta.1",
3+
"version": "4.1.7-beta.2",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/lib/processSnapshot.ts

+12
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,18 @@ export default async function processSnapshot(snapshot: Snapshot, ctx: Context):
476476
discoveryErrors.timestamp = new Date().toISOString();
477477
// ctx.log.warn(discoveryErrors);
478478
}
479+
480+
if (ctx.config.useGlobalCache) {
481+
const keys = globalCache.keys();
482+
keys.forEach((key) => {
483+
if (!(key in cache)) {
484+
const globalCacheData = globalCache.get(key);
485+
if (globalCacheData) {
486+
cache[key] = globalCacheData;
487+
}
488+
}
489+
});
490+
}
479491
return {
480492
processedSnapshot: {
481493
name: snapshot.name,

0 commit comments

Comments
 (0)