-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31fed37
commit 6577d79
Showing
44 changed files
with
1,089 additions
and
1,053 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ reports | |
# App packaged | ||
release | ||
dist | ||
report | ||
distWeb | ||
dll | ||
vendor | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ vite.config.mjs | |
# test | ||
coverage | ||
test | ||
report | ||
tests | ||
test-workspace | ||
.vscode-test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/webviews/src/constants/cli/cliOutputComponents.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { describe, it, expect } from 'vitest' | ||
import React from 'react' | ||
|
||
import { render } from 'testSrc/helpers' | ||
import { InitOutputText, cliTexts } from './cliOutputComponents' | ||
|
||
describe('InitOutputText', () => { | ||
it('should render correct output with valid inputs', () => { | ||
const host = '127.0.0.1' | ||
const port = 6379 | ||
const dbIndex = 1 | ||
const { container } = render(<>{InitOutputText(host, port, dbIndex, false)}</>) | ||
|
||
expect(container).toHaveTextContent('Connecting...') | ||
expect(container).toHaveTextContent('Pinging Redis server on ') | ||
expect(container).toHaveTextContent(`${host}:${port}`) | ||
}) | ||
}) | ||
|
||
describe('cliTexts', () => { | ||
it('CLI_UNSUPPORTED_COMMANDS should format correctly', () => { | ||
const commandLine = 'INFO' | ||
const commands = 'AUTH, CONFIG' | ||
const result = cliTexts.CLI_UNSUPPORTED_COMMANDS(commandLine, commands) | ||
|
||
expect(result).toBe( | ||
`${`${commandLine} is not supported by the Redis CLI. The list of all unsupported commands: ${commands}`}`, | ||
) | ||
}) | ||
|
||
it('CLI_ERROR_MESSAGE should render with the correct message', () => { | ||
const message = 'An error occurred' | ||
const result = cliTexts.CLI_ERROR_MESSAGE(message) | ||
const { getByText } = render(<>{result}</>) | ||
expect(getByText(message)).toHaveClass('text-vscode-errorForeground') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.