Skip to content

CLI not using configFile defined by flag #18

@DavidRNogueira

Description

@DavidRNogueira

I have a config file named: visual-regression-html-report.config.js

import { defineConfig } from 'cypress-image-diff-html-report';

export default defineConfig({
  reportJsonDir: 'visual-regression/html-report',
  outputDir: 'visual-regression/html-report',
  autoOpen: true
});

I also have a cypress-image-diff.config.js:

const config = {
  SCREENSHOTS_DIR: 'visual-regression',
  JSON_REPORT: {
    FILENAME: 'cypress_visual_report',
    OVERWRITE: true
  },
  REPORT_DIR: 'visual-regression/html-report'
};

module.exports = config;

When I run cypress-image-diff-html-report generate --configFile visual-regression-html-report.config.js

I see the following error:

[cypress-image-diff-html-report]: Given reportJsonDir does not exist /path/to/project/cypress-image-diff-html-report. Make sure you specify a valid reportJsonDir or reportJsonFilePat

I see the same issue with the start command. If I pass the reportJsonDir flags directly to the CLI, it works. For some reason the configFile CLI option is not working

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions