Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit afcec39

Browse files
committed
test: that CReset injects styles
1 parent 7f12f07 commit afcec39

File tree

2 files changed

+377
-6
lines changed

2 files changed

+377
-6
lines changed

packages/chakra-ui-core/src/CReset/tests/CReset.test.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,25 @@ import CReset from '../'
22
import { render, defaultProviders } from '@/tests/test-utils'
33

44
const renderComponent = (options = {}) => {
5-
return render(
6-
CReset,
7-
options,
8-
() => ({ provide: defaultProviders() })
9-
)
5+
return render(
6+
CReset,
7+
options,
8+
() => ({ provide: defaultProviders() })
9+
)
1010
}
1111

1212
describe('CReset.vue', () => {
13-
1413
it('should render correctly', () => {
1514
const { asFragment } = renderComponent()
1615

1716
expect(asFragment()).toMatchSnapshot()
1817
})
1918

19+
it('should inject global styles', () => {
20+
const { container } = renderComponent({
21+
container: document
22+
})
23+
24+
expect(container.head).toMatchSnapshot()
25+
})
2026
})

0 commit comments

Comments
 (0)