-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cody: Update menu icons and order #52263
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
@@ -1,6 +1,18 @@ | |||
import { convertGitCloneURLToCodebaseName } from './ChatViewProvider' | |||
|
|||
describe('convertGitCloneURLToCodebaseName', () => { | |||
// before each test, mock the createOutputChannel function from vscode with globalThis | |||
beforeEach(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the same error Test suite failed to run TypeError: Cannot read properties of undefined (reading 'createOutputChannel')
when I tried
beforeEach(() => {
jest.resetModules()
jest.mock('vscode', () => ({
window: {
createOutputChannel: () => ({
appendLine: () => {},
}),
},
}))
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OH you know why, it's because the import happens before we do the mock already 🙃
There's a way in jest to fix this, let me look it up
@@ -1,6 +1,18 @@ | |||
import { convertGitCloneURLToCodebaseName } from './ChatViewProvider' | |||
|
|||
describe('convertGitCloneURLToCodebaseName', () => { | |||
// before each test, mock the createOutputChannel function from vscode with globalThis | |||
beforeEach(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting the same error Test suite failed to run TypeError: Cannot read properties of undefined (reading 'createOutputChannel')
when I tried
beforeEach(() => {
jest.resetModules()
jest.mock('vscode', () => ({
window: {
createOutputChannel: () => ({
appendLine: () => {},
}),
},
}))
})
or
globalThis.vscode = {
createOutputChannel: () => {}
} as any
Update title menu icon to align with Tim's design (figma) and web design:
Tim's Design:
Web:
Before:
After:
Other minor clean up for the package.json
"cody.customHeaders"
to the order list item number 4 and moved all the experimental features after it for clarity.guardrails
since it was missingTest plan
See screenshots