aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--karma.conf.js5
-rw-r--r--spec/SpecRunner.html12
-rw-r--r--spec/fixture.css6
-rw-r--r--spec/pretest.js25
4 files changed, 35 insertions, 13 deletions
diff --git a/karma.conf.js b/karma.conf.js
index 056213f..08ca89c 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -17,6 +17,11 @@ module.exports = function(config) {
files: [
'spec/pretest.js',
{
+ pattern: 'spec/fixture.css',
+ included: false,
+ served: true
+ },
+ {
pattern: 'spec/fixture.svg',
included: false,
served: true
diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html
index 4f204a6..def09fe 100644
--- a/spec/SpecRunner.html
+++ b/spec/SpecRunner.html
@@ -2,14 +2,14 @@
<html>
<head>
<meta charset="utf-8">
- <title>Jasmine Spec Runner v2.4.1</title>
+ <title>Jasmine Spec Runner v2.5.2</title>
- <link rel="shortcut icon" type="image/png" href="lib/jasmine-2.4.1/jasmine_favicon.png">
- <link rel="stylesheet" href="lib/jasmine-2.4.1/jasmine.css">
+ <link rel="shortcut icon" type="image/png" href="lib/jasmine-2.5.2/jasmine_favicon.png">
+ <link rel="stylesheet" href="lib/jasmine-2.5.2/jasmine.css">
- <script src="lib/jasmine-2.4.1/jasmine.js"></script>
- <script src="lib/jasmine-2.4.1/jasmine-html.js"></script>
- <script src="lib/jasmine-2.4.1/boot.js"></script>
+ <script src="lib/jasmine-2.5.2/jasmine.js"></script>
+ <script src="lib/jasmine-2.5.2/jasmine-html.js"></script>
+ <script src="lib/jasmine-2.5.2/boot.js"></script>
<style type="text/css" media="screen">
#drawing {
diff --git a/spec/fixture.css b/spec/fixture.css
new file mode 100644
index 0000000..e72e421
--- /dev/null
+++ b/spec/fixture.css
@@ -0,0 +1,6 @@
+#drawing {
+ width: 500px;
+ height: 500px;
+ position: fixed;
+ z-index: -1;
+} \ No newline at end of file
diff --git a/spec/pretest.js b/spec/pretest.js
index 7655317..6139bc4 100644
--- a/spec/pretest.js
+++ b/spec/pretest.js
@@ -1,9 +1,20 @@
'use strict'
-var svg, xhr = new XMLHttpRequest()
-xhr.open('GET', '/base/spec/fixture.svg', false)
-xhr.send()
-if(xhr.status !== 200)
- console.error('SVG fixture could not be loaded. Tests will fail.')
-svg = xhr.responseText
-document.body.innerHTML = svg \ No newline at end of file
+function get(uri) {
+ let xhr = new XMLHttpRequest()
+ xhr.open('GET', uri, false)
+ xhr.send()
+ if(xhr.status !== 200)
+ console.error('SVG.js fixture could not be loaded. Tests will fail.')
+ return xhr.responseText
+}
+
+function main() {
+ let style = document.createElement("style")
+ document.head.appendChild(style)
+ style.sheet.insertRule( get('/base/spec/fixture.css'), 0 )
+
+ document.body.innerHTML = get('/base/spec/fixture.svg')
+}
+
+main()