diff --git a/src/commands/snapshot.ts b/src/commands/snapshot.ts index 3f6d3bfb..35e3782c 100644 --- a/src/commands/snapshot.ts +++ b/src/commands/snapshot.ts @@ -132,6 +132,6 @@ export default class Snapshot extends PercyCommand { const ignore = parseGlobs(configuration['ignore-files']) const paths = await globby(globs, { cwd: configuration.path, ignore }) - console.log(paths.map((p) => configuration['base-url'] + p).join('\n')) + console.log(paths.map((p) => configuration['base-url'] + p).sort().join('\n')) } } diff --git a/src/services/image-snapshot-service.ts b/src/services/image-snapshot-service.ts index b43e8a89..6367667b 100644 --- a/src/services/image-snapshot-service.ts +++ b/src/services/image-snapshot-service.ts @@ -112,7 +112,7 @@ export default class ImageSnapshotService extends PercyClientService { async snapshotAll({ dry = false }: { dry?: boolean } = {}) { const globs = parseGlobs(this.configuration.files) const ignore = parseGlobs(this.configuration.ignore) - const paths = await globby(globs, { cwd: this.configuration.path, ignore }) + const paths = (await globby(globs, { cwd: this.configuration.path, ignore })).sort() let error if (!paths.length) {