Skip to content

Commit

Permalink
Drop . from chromatic.config.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed Sep 12, 2023
1 parent 942d60c commit d6786c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions node-src/lib/getConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ it('reads configuration successfully', async () => {
expect(await getConfiguration()).toEqual({ projectToken: 'json-file-token' });
});

it('reads from .chromatic.config.json by default', async () => {
it('reads from chromatic.config.json by default', async () => {
mockedReadFile.mockResolvedValue({ projectToken: 'json-file-token' }).mockClear();
await getConfiguration();

expect(mockedReadFile).toHaveBeenCalledWith('.chromatic.config.json');
expect(mockedReadFile).toHaveBeenCalledWith('chromatic.config.json');
});

it('can read from a different location', async () => {
Expand Down
2 changes: 1 addition & 1 deletion node-src/lib/getConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const configurationSchema = z
export type Configuration = z.infer<typeof configurationSchema>;

export async function getConfiguration(configFile?: string) {
const usedConfigFile = configFile || '.chromatic.config.json';
const usedConfigFile = configFile || 'chromatic.config.json';
try {
const rawJson = await readFile(usedConfigFile);

Expand Down
2 changes: 1 addition & 1 deletion node-src/lib/parseArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function parseArgs(argv: string[]) {
--auto-accept-changes [branch] If there are any changes to the build, automatically accept them. Only for [branch], if specified. Globs are supported via picomatch.
--branch-name <branch> Override the branch name. Only meant to be used for unsupported CI integrations and fixing cross-fork PR comparisons. Also accepts <owner>:<branch> format.
--ci Mark this build as a CI build. Alternatively, set the 'CI' environment variable (present in most CI systems). This option implies --no-interactive.
--config-file, -c <path> Path to a configuration file containing the options listed in JSON format. Uses ".chromatic.config.json" by default.
--config-file, -c <path> Path to a configuration file containing the options listed in JSON format. Uses "chromatic.config.json" by default.
--exit-once-uploaded [branch] Exit with 0 once the built version has been published to Chromatic. Only for [branch], if specified. Globs are supported via picomatch.
--exit-zero-on-changes [branch] If all snapshots render but there are visual changes, exit with code 0 rather than the usual exit code 1. Only for [branch], if specified. Globs are supported via picomatch.
--externals <filepath> Disable TurboSnap when any of these files have changed since the baseline build. Globs are supported via picomatch. This flag can be specified multiple times. Requires --only-changed.
Expand Down

0 comments on commit d6786c5

Please sign in to comment.