Skip to content

Commit

Permalink
chore(tests): updated success messages in components command to use "…
Browse files Browse the repository at this point in the history
…to" instead of "in"
  • Loading branch information
alvarosabu committed Jan 22, 2025
1 parent 5ac8c15 commit 300f50d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/commands/components/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('pull', () => {
path: undefined,
separateFiles: false,
})
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully in ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/components.json`)}`)
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully to ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/components.json`)}`)
})

it('should fetch a component by name', async () => {
Expand Down Expand Up @@ -201,7 +201,7 @@ describe('pull', () => {
groups: [],
presets: [],
}, { path: '/path/to/components', separateFiles: false })
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully in ${chalk.hex(colorPalette.PRIMARY)(`/path/to/components/components.json`)}`)
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully to ${chalk.hex(colorPalette.PRIMARY)(`/path/to/components/components.json`)}`)
})
})

Expand Down Expand Up @@ -234,7 +234,7 @@ describe('pull', () => {
groups: [],
presets: [],
}, { filename: 'custom', separateFiles: false })
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully in ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/custom.json`)}`)
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully to ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/custom.json`)}`)
})
})

Expand Down Expand Up @@ -277,7 +277,7 @@ describe('pull', () => {
groups: [],
presets: [],
}, { separateFiles: true, path: undefined })
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully in ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/`)}`)
expect(konsola.ok).toHaveBeenCalledWith(`Components downloaded successfully to ${chalk.hex(colorPalette.PRIMARY)(`.storyblok/components/12345/`)}`)
})

it('should warn the user if the --filename is used along', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ componentsCommand
konsola.warn(`The --filename option is ignored when using --separate-files`)
}
const filePath = path ? `${path}/` : `.storyblok/components/${space}/`
konsola.ok(`Components downloaded successfully in ${chalk.hex(colorPalette.PRIMARY)(filePath)}`)
konsola.ok(`Components downloaded successfully to ${chalk.hex(colorPalette.PRIMARY)(filePath)}`)
}
else if (componentName) {
const fileName = suffix ? `${filename}.${suffix}.json` : `${componentName}.json`
Expand Down

0 comments on commit 300f50d

Please sign in to comment.