Skip to content

Commit

Permalink
fix: update blob to blobs
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Lane <[email protected]>
  • Loading branch information
wconrad265 and tlane25 committed Oct 29, 2024
1 parent f45f6d4 commit 637df20
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions tests/integration/commands/blobs/blobs-delete.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const routes: Route[] = [
},
]

describe('blob:delete command', () => {
describe('blobs:delete command', () => {
const storeName = 'my-store'
const key = 'my-key'

Expand Down Expand Up @@ -80,7 +80,7 @@ describe('blob:delete command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt').mockResolvedValue({ confirm: true })

await runMockProgram(['', '', 'blob:delete', storeName, key])
await runMockProgram(['', '', 'blobs:delete', storeName, key])

expect(promptSpy).toHaveBeenCalledWith({
type: 'confirm',
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('blob:delete command', () => {
const promptSpy = vi.spyOn(inquirer, 'prompt').mockResolvedValue({ confirm: false })

try {
await runMockProgram(['', '', 'blob:delete', storeName, key])
await runMockProgram(['', '', 'blobs:delete', storeName, key])
} catch (error) {
// We expect the process to exit, so this is fine
expect(error.message).toContain('process.exit unexpectedly called')
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('blob:delete command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:delete', storeName, key, '--force'])
await runMockProgram(['', '', 'blobs:delete', storeName, key, '--force'])

expect(promptSpy).not.toHaveBeenCalled()

Expand All @@ -165,7 +165,7 @@ describe('blob:delete command', () => {
const promptSpy = vi.spyOn(inquirer, 'prompt')

try {
await runMockProgram(['', '', 'blob:delete', storeName, key, '--force'])
await runMockProgram(['', '', 'blobs:delete', storeName, key, '--force'])
} catch (error) {
expect(error.message).toContain(
`Could not delete blob ${chalk.yellow(key)} from store ${chalk.yellow(storeName)}`,
Expand Down Expand Up @@ -208,7 +208,7 @@ describe('blob:delete command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:delete', storeName, key])
await runMockProgram(['', '', 'blobs:delete', storeName, key])
expect(promptSpy).not.toHaveBeenCalled()

expect(log).not.toHaveBeenCalledWith(warningMessage)
Expand All @@ -230,7 +230,7 @@ describe('blob:delete command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:delete', storeName, key])
await runMockProgram(['', '', 'blobs:delete', storeName, key])

expect(promptSpy).not.toHaveBeenCalled()

Expand Down
16 changes: 8 additions & 8 deletions tests/integration/commands/blobs/blobs-set.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const routes: Route[] = [
},
]

describe('blob:set command', () => {
describe('blobs:set command', () => {
const storeName = 'my-store'
const key = 'my-key'
const value = 'my-value'
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('blob:set command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt').mockResolvedValue({ wantsToSet: true })

await runMockProgram(['', '', 'blob:set', storeName, key, value])
await runMockProgram(['', '', 'blobs:set', storeName, key, value])

expect(promptSpy).not.toHaveBeenCalled()
expect(log).toHaveBeenCalledWith(successMessage)
Expand All @@ -104,7 +104,7 @@ describe('blob:set command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt').mockResolvedValue({ confirm: true })

await runMockProgram(['', '', 'blob:set', storeName, key, newValue])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue])

expect(promptSpy).toHaveBeenCalledWith({
type: 'confirm',
Expand Down Expand Up @@ -135,7 +135,7 @@ describe('blob:set command', () => {
const promptSpy = vi.spyOn(inquirer, 'prompt').mockResolvedValue({ confirm: false })

try {
await runMockProgram(['', '', 'blob:set', storeName, key, newValue])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue])
} catch (error) {
// We expect the process to exit, so this is fine
expect(error.message).toContain('process.exit unexpectedly called with "0"')
Expand Down Expand Up @@ -169,7 +169,7 @@ describe('blob:set command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:set', storeName, key, newValue, '--force'])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue, '--force'])

expect(promptSpy).not.toHaveBeenCalled()

Expand All @@ -192,7 +192,7 @@ describe('blob:set command', () => {
const promptSpy = vi.spyOn(inquirer, 'prompt')

try {
await runMockProgram(['', '', 'blob:set', storeName, key, newValue, '--force'])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue, '--force'])
} catch (error) {
expect(error.message).toContain(`Could not set blob ${chalk.yellow(key)} in store ${chalk.yellow(storeName)}`)
}
Expand Down Expand Up @@ -232,7 +232,7 @@ describe('blob:set command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:set', storeName, key, newValue, '--force'])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue, '--force'])

expect(promptSpy).not.toHaveBeenCalled()

Expand All @@ -258,7 +258,7 @@ describe('blob:set command', () => {

const promptSpy = vi.spyOn(inquirer, 'prompt')

await runMockProgram(['', '', 'blob:set', storeName, key, newValue, '--force'])
await runMockProgram(['', '', 'blobs:set', storeName, key, newValue, '--force'])
expect(promptSpy).not.toHaveBeenCalled()

expect(log).not.toHaveBeenCalledWith(warningMessage)
Expand Down

0 comments on commit 637df20

Please sign in to comment.