Skip to content

Commit a6d0f4d

Browse files
committed
feat: snapshot
1 parent 23c3a63 commit a6d0f4d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/regressify.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function regressifyProcess(command: 'approve' | 'reference' | 'test
2727
const configs = getConfigs(args, backstopDirName);
2828

2929
if (command === 'snapshot') {
30-
await snapshot({ configs, backstopDirName });
30+
snapshot({ configs, backstopDirName });
3131
return;
3232
}
3333

src/snapshot.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Config } from 'backstopjs';
44
import chalk from 'chalk';
55
import { BackstopReport, HtmlReportSummary } from './types';
66

7-
async function processTestSuite(backstopDir: string, config: Config): HtmlReportSummary | null {
7+
function processTestSuite(backstopDir: string, config: Config): HtmlReportSummary | null {
88
const testDir = path.join(backstopDir, config.id);
99
if (!fs.existsSync(testDir)) {
1010
console.log(chalk.red(`Test directory does not exist: ${testDir}`));
@@ -145,7 +145,7 @@ const generateHtmlReportSummary = (backstopDir: string, summaries: HtmlReportSum
145145
console.log(chalk.blue(`Snapshot report summary generated at: ${reportPath}`));
146146
};
147147

148-
export async function snapshot({ configs, backstopDirName }: { configs: Config[]; backstopDirName: string }) {
148+
export function snapshot({ configs, backstopDirName }: { configs: Config[]; backstopDirName: string }) {
149149
const backstopDir = path.join(process.cwd(), backstopDirName);
150150
if (!fs.existsSync(backstopDir)) {
151151
console.log(chalk.red(`Backstop directory does not exist: ${backstopDir}`));

0 commit comments

Comments
 (0)