aboutsummaryrefslogtreecommitdiffstats
path: root/spec/setupSVGDom.js
blob: be5b803177dfd9462bd598c24951ac04b525cad7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import './RAFPlugin.js'
import { createHTMLWindow } from 'svgdom'

/* globals beforeEach, afterEach, jasmine */
import { buildCanvas, clear } from './helpers.js'
import { registerWindow } from '../src/main.js'

jasmine.DEFAULT_TIMEOUT_INTERVAL = 200

function setup() {
  const win = createHTMLWindow()
  registerWindow(win, win.document)
  buildCanvas()
  // buildFixtures()
  global.container = win.document.getElementById('canvas')
}

function teardown() {
  clear()
  global.container = null
  registerWindow()
}

beforeEach(setup)
afterEach(teardown)