Skip to content

Commit

Permalink
fix: Generate report with diff screenshots (not latest) (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
manosim committed Nov 3, 2021
1 parent ac02604 commit c96fcb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/report.test.ts
Expand Up @@ -43,7 +43,7 @@ describe('report.ts', () => {
await generateReport(logger, 'ios');

expect(readdirMock).toHaveBeenCalledWith(
'/Users/johndoe/Projects/my-project/.owl/latest/ios'
'/Users/johndoe/Projects/my-project/.owl/diff/ios'
);
expect(handlebarsCompileMock).toHaveBeenCalledTimes(1);
expect(writeFileMock).toHaveBeenCalledWith(
Expand Down
4 changes: 2 additions & 2 deletions lib/report.ts
Expand Up @@ -8,8 +8,8 @@ import { Platform } from './types';
export const generateReport = async (logger: Logger, platform: Platform) => {
const cwd = process.cwd();
const reportDirPath = path.join(cwd, '.owl', 'report');
const screenshotsDirPath = path.join(cwd, '.owl', 'latest', platform);
const screenshots = await fs.readdir(screenshotsDirPath);
const diffScreenshotsDirPath = path.join(cwd, '.owl', 'diff', platform);
const screenshots = await fs.readdir(diffScreenshotsDirPath);

logger.info(`[OWL] Generating Report`);

Expand Down

0 comments on commit c96fcb7

Please sign in to comment.