Skip to content

Commit 8114a21

Browse files
committed
Set up root in controller tests
1 parent 49c486f commit 8114a21

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/controller.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
import {controller} from '../lib/controller.js'
22

33
describe('controller', () => {
4+
let root
5+
6+
beforeEach(() => {
7+
root = document.createElement('div')
8+
document.body.appendChild(root)
9+
})
10+
11+
afterEach(() => {
12+
root.remove()
13+
})
14+
415
it('calls register', async () => {
516
class ControllerRegisterElement extends HTMLElement {}
617
controller(ControllerRegisterElement)

0 commit comments

Comments
 (0)