Skip to content

Commit 56e93f1

Browse files
committed
Fix context issue in test cases for code area
1 parent 30601e6 commit 56e93f1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

__tests__/components/snippng_code_area.test.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ describe("SnippngCodeArea", () => {
4747
await act(async () => {
4848
render(
4949
<SnippngEditorContext.Provider
50-
// @ts-ignore
5150
value={{
5251
editorConfig: { ...defaultEditorConfig, showLineNumbers: false },
52+
// @ts-ignore
53+
handleConfigChange: () => {},
5354
// override showLineNumbers with false
5455
}}
5556
>
@@ -81,9 +82,10 @@ describe("SnippngCodeArea", () => {
8182
await act(async () => {
8283
render(
8384
<SnippngEditorContext.Provider
84-
// @ts-ignore
8585
value={{
8686
editorConfig: { ...defaultEditorConfig, hasDropShadow: false },
87+
// @ts-ignore
88+
handleConfigChange: () => {},
8789
// override hasDropShadow with false
8890
}}
8991
>
@@ -115,9 +117,10 @@ describe("SnippngCodeArea", () => {
115117
await act(async () => {
116118
render(
117119
<SnippngEditorContext.Provider
118-
// @ts-ignore
119120
value={{
120121
editorConfig: { ...defaultEditorConfig, rounded: false },
122+
// @ts-ignore
123+
handleConfigChange: () => {},
121124
// override rounded with false
122125
}}
123126
>
@@ -150,9 +153,10 @@ describe("SnippngCodeArea", () => {
150153
await act(async () => {
151154
render(
152155
<SnippngEditorContext.Provider
153-
// @ts-ignore
154156
value={{
155157
editorConfig: { ...defaultEditorConfig, showFileName: false },
158+
// @ts-ignore
159+
handleConfigChange: () => {},
156160
// override hasDropShadow with false
157161
}}
158162
>
@@ -174,13 +178,14 @@ describe("SnippngCodeArea", () => {
174178
await act(async () => {
175179
render(
176180
<SnippngEditorContext.Provider
177-
// @ts-ignore
178181
value={{
179182
editorConfig: {
180183
...defaultEditorConfig,
181184
gradients: [],
182185
wrapperBg: "#eee811",
183186
},
187+
// @ts-ignore
188+
handleConfigChange: () => {},
184189
// override hasDropShadow with false
185190
}}
186191
>

0 commit comments

Comments
 (0)