Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
27a2f98a
Unverified
Commit
27a2f98a
authored
1 year ago
by
Guilherme Gazzo
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
ci: Mock highlight for unit tests (#29539)
parent
12d97e16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/gazzodown/src/Markup.spec.tsx
+6
-0
6 additions, 0 deletions
packages/gazzodown/src/Markup.spec.tsx
with
6 additions
and
0 deletions
packages/gazzodown/src/Markup.spec.tsx
+
6
−
0
View file @
27a2f98a
...
@@ -7,6 +7,12 @@ import Markup from './Markup';
...
@@ -7,6 +7,12 @@ import Markup from './Markup';
afterEach
(
cleanup
);
afterEach
(
cleanup
);
beforeAll
(()
=>
{
jest
.
mock
(
'
highlight.js
'
,
()
=>
({
highlightElement
:
():
void
=>
undefined
,
}));
});
it
(
'
renders empty
'
,
()
=>
{
it
(
'
renders empty
'
,
()
=>
{
const
{
container
}
=
render
(<
Markup
tokens
=
{
[]
}
/>);
const
{
container
}
=
render
(<
Markup
tokens
=
{
[]
}
/>);
expect
(
container
).
toBeEmptyDOMElement
();
expect
(
container
).
toBeEmptyDOMElement
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment