aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--karma.conf.js19
-rw-r--r--package.json2
-rw-r--r--spec/pretest.js9
-rw-r--r--spec/spec/adopter.js4
4 files changed, 21 insertions, 13 deletions
diff --git a/karma.conf.js b/karma.conf.js
index 6b8dd54..056213f 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -10,28 +10,29 @@ module.exports = function(config) {
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
- frameworks: ['jasmine', 'fixture'],
+ frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
- 'spec/fixture.svg',
+ 'spec/pretest.js',
+ {
+ pattern: 'spec/fixture.svg',
+ included: false,
+ served: true
+ },
'dist/svg.js',
- 'spec/**/*.js'
+ 'spec/spec/**/*.js'
],
// list of files to exclude
- exclude: [
- 'spec/lib/**/*.js'
- ],
+ exclude: [],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {
- '**/*.html': ['html2js']
- },
+ preprocessors: {},
// test results reporter to use
diff --git a/package.json b/package.json
index e8960ae..a6d6856 100644
--- a/package.json
+++ b/package.json
@@ -67,8 +67,6 @@
"jasmine-core": "^2.5.2",
"karma": "^1.3.0",
"karma-firefox-launcher": "^1.0.0",
- "karma-fixture": "^0.2.6",
- "karma-html2js-preprocessor": "^1.1.0",
"karma-jasmine": "^1.0.2",
"request": "^2.75.0"
}
diff --git a/spec/pretest.js b/spec/pretest.js
new file mode 100644
index 0000000..7655317
--- /dev/null
+++ b/spec/pretest.js
@@ -0,0 +1,9 @@
+'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
diff --git a/spec/spec/adopter.js b/spec/spec/adopter.js
index 0136d0e..a8fdd11 100644
--- a/spec/spec/adopter.js
+++ b/spec/spec/adopter.js
@@ -1,5 +1,5 @@
describe('Adopter', function() {
- var path
+ var path, polyline, polygon
beforeEach(function() {
path = SVG.get('lineAB')
@@ -56,6 +56,6 @@ describe('Adopter', function() {
expect(desc instanceof SVG.Element).toBeTruthy()
})
})
-
+
}) \ No newline at end of file