Skip to content

Commit

Permalink
add key to configuration to fix #1022
Browse files Browse the repository at this point in the history
  • Loading branch information
winkerVSbecks committed Aug 14, 2024
1 parent 9edbdc0 commit c215322
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions node-src/lib/getConfiguration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ beforeEach(() => {
it('reads configuration successfully', async () => {
mockedReadFile.mockReturnValue(
JSON.stringify({
$schema: 'https://www.chromatic.com/config-file.schema.json',
projectId: 'project-id',
projectToken: 'project-token',

Expand Down Expand Up @@ -47,6 +48,7 @@ it('reads configuration successfully', async () => {
);

expect(await getConfiguration()).toEqual({
$schema: 'https://www.chromatic.com/config-file.schema.json',
configFile: 'chromatic.config.json',
projectId: 'project-id',
projectToken: 'project-token',
Expand Down
2 changes: 2 additions & 0 deletions node-src/lib/getConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { invalidConfigurationFile } from '../ui/messages/errors/invalidConfigura

const configurationSchema = z
.object({
$schema: z.string(),

projectId: z.string(),
projectToken: z.string(), // deprecated

Expand Down

0 comments on commit c215322

Please sign in to comment.