aboutsummaryrefslogtreecommitdiffstats
path: root/spec/setupSVGDom.js
blob: 1d9ff9590dc6c6c2b7c788cc81aa8bd27c9243a9 (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
import { createSVGWindow } 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 = createSVGWindow()
  registerWindow(win, win.document)
  buildCanvas()
  // buildFixtures()
  global.container = win.document.getElementById('canvas')
}

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

beforeEach(setup)
afterEach(teardown)