@@ -3,10 +3,10 @@ import { render } from "@testing-library/react";
3
3
4
4
import { ElementAssertion } from "../../../src/lib/ElementAssertion" ;
5
5
6
+ import { HaveClassTestComponent } from "./fixtures/haveClassTestComponent" ;
6
7
import { NestedElementsTestComponent } from "./fixtures/nestedElementsTestComponent" ;
7
8
import { SimpleTestComponent } from "./fixtures/simpleTestComponent" ;
8
9
import { WithAttributesTestComponent } from "./fixtures/withAttributesTestComponent" ;
9
- import { HaveClassTestComponent } from "./fixtures/haveClassTestComponent" ;
10
10
11
11
describe ( "[Unit] ElementAssertion.test.ts" , ( ) => {
12
12
describe ( ".toBeInTheDocument" , ( ) => {
@@ -193,7 +193,7 @@ describe("[Unit] ElementAssertion.test.ts", () => {
193
193
const test = new ElementAssertion ( divTest ) ;
194
194
expect ( ( ) => test . toHaveClass ( "bar" ) )
195
195
. toThrowError ( AssertionError )
196
- . toHaveMessage ( ` Expected the element to have class(es): "bar"` ) ;
196
+ . toHaveMessage ( " Expected the element to have class(es): \ "bar\"" ) ;
197
197
} ) ;
198
198
} ) ;
199
199
@@ -207,15 +207,15 @@ describe("[Unit] ElementAssertion.test.ts", () => {
207
207
} ) ;
208
208
} ) ;
209
209
210
- context ( "when the element does not have the exact matching expected class " , async ( ) => {
210
+ context ( "when the element does not have the exact matching expected class " , ( ) => {
211
211
it ( "throws an assertion error" , async ( ) => {
212
212
const { findByTestId } = render ( < HaveClassTestComponent /> ) ;
213
213
const divTest = await findByTestId ( "classTest" ) ;
214
214
divTest . className = "foo bar extra" ;
215
215
const test = new ElementAssertion ( divTest ) ;
216
216
expect ( ( ) => test . toHaveClass ( [ "foo" , "bar" ] , { exact : true } ) )
217
217
. toThrowError ( AssertionError )
218
- . toHaveMessage ( ` Expected the element to have exactly these classes: "foo bar"` ) ;
218
+ . toHaveMessage ( " Expected the element to have exactly these classes: \ "foo bar\"" ) ;
219
219
} ) ;
220
220
} ) ;
221
221
} ) ;
0 commit comments