-
Notifications
You must be signed in to change notification settings - Fork 19
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
Chore/autumn clean #1005
Chore/autumn clean #1005
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { forwardRef } from 'react'; | ||
|
||
jest.mock('@grafana/ui', () => { | ||
const actual = jest.requireActual('@grafana/ui'); | ||
|
||
const Icon = forwardRef((props, ref) => <svg {...props} />); | ||
Icon.displayName = 'Icon'; | ||
|
||
// Monaco does not render with jest and is stuck at "Loading..." | ||
// There doesn't seem to be a solution to this at this point, | ||
// mocking it instead. Related github issue: | ||
// https://github.com/suren-atoyan/monaco-react/issues/88 | ||
const CodeEditor = React.forwardRef((props: any, ref: any) => { | ||
return <textarea ref={ref} data-testid="code-editor" onChange={props.onChange} value={props.value} />; | ||
}); | ||
CodeEditor.displayName = 'CodeEditor'; | ||
|
||
return { | ||
...actual, | ||
Icon, | ||
BigValue: ({ value }: { value: { numeric: number; text?: string; title?: string } }) => ( | ||
<div> | ||
{/* {value.numeric} */} | ||
{value.text && <span>{value.text}</span>} | ||
{value.title && <label>{value.title}</label>} | ||
</div> | ||
), | ||
CodeEditor, | ||
}; | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from 'react'; | ||
|
||
jest.mock(`components/SimpleMap`, () => ({ | ||
SimpleMap: () => <div>A pretty map</div>, | ||
})); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
emit: () => {}, | ||
}; |
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.
😢
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.
We'll bring it back in the near future 😄