Skip to content

Commit

Permalink
Selective diffing for nightwach
Browse files Browse the repository at this point in the history
  • Loading branch information
FriggaHel committed May 20, 2024
1 parent 94fad8b commit 9817a83
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const EventEmitter = require('events').EventEmitter;
const { ensureError, getFullPageConfig } = require('@saucelabs/visual');
const {
ensureError,
getFullPageConfig,
selectiveRegionsToRegionIn,
} = require('@saucelabs/visual');
const { parseIgnoreOptions, toIgnoreRegionIn } = require('../../utils/regions');
const { getMetaInfo, getVisualApi } = require('../../utils/api');
const { VISUAL_BUILD_ID_KEY } = require('../../utils/constants');
Expand Down Expand Up @@ -49,6 +53,13 @@ module.exports = class SauceVisualCheck extends EventEmitter {
? await toIgnoreRegionIn(resolvedIgnoreOptions)
: [];
//
// Regions
const regions = await selectiveRegionsToRegionIn(
options.regions ?? [],
toIgnoreRegionIn,
);
ignoreRegions.push(...regions);
//
// Get more info about the session
const {
capabilities,
Expand Down

0 comments on commit 9817a83

Please sign in to comment.