aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-13 11:19:05 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 13:47:39 +0100
commit57d7dd0232b283874f09bb08e6d05ccfc6d1da24 (patch)
treec18718ec76d5532e56bc7dc53d7869413f3ecaf5
parent54d407608efec1ca37f18178082bb9703cf8bc1e (diff)
downloadsvg.js-57d7dd0232b283874f09bb08e6d05ccfc6d1da24.tar.gz
svg.js-57d7dd0232b283874f09bb08e6d05ccfc6d1da24.zip
make es5 tests
-rw-r--r--.gitignore1
-rw-r--r--package-lock.json171
-rw-r--r--package.json2
-rw-r--r--rollup.tests.js29
-rw-r--r--spec/SpecRunner.html6
5 files changed, 207 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 9fa0db9..2b1e47e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ node_modules/
.vscode/
coverage/
fonts/
+spec/es5TestBundle.js
.env
diff --git a/package-lock.json b/package-lock.json
index 95b4822..d51e3ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1356,6 +1356,12 @@
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
"dev": true
},
+ "async-array-reduce": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/async-array-reduce/-/async-array-reduce-0.2.1.tgz",
+ "integrity": "sha1-yL4BCitc0A3qlsgRFgNGk9/dgtE=",
+ "dev": true
+ },
"async-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
@@ -3309,6 +3315,15 @@
"integrity": "sha512-cebqLtV8KOZfw0UI8TEFWxtczxxC1jvyUvx6H4fyp1K1FN7A4Q+uggVUlOsI1K8AGU0rwOGqP8nCapdrw8CYQg==",
"dev": true
},
+ "expand-tilde": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz",
+ "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=",
+ "dev": true,
+ "requires": {
+ "os-homedir": "^1.0.1"
+ }
+ },
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
@@ -3647,6 +3662,12 @@
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
"dev": true
},
+ "fs-exists-sync": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
+ "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=",
+ "dev": true
+ },
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
@@ -4318,6 +4339,44 @@
}
}
},
+ "global-modules": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz",
+ "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=",
+ "dev": true,
+ "requires": {
+ "global-prefix": "^0.1.4",
+ "is-windows": "^0.2.0"
+ },
+ "dependencies": {
+ "is-windows": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
+ "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=",
+ "dev": true
+ }
+ }
+ },
+ "global-prefix": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz",
+ "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=",
+ "dev": true,
+ "requires": {
+ "homedir-polyfill": "^1.0.0",
+ "ini": "^1.3.4",
+ "is-windows": "^0.2.0",
+ "which": "^1.2.12"
+ },
+ "dependencies": {
+ "is-windows": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz",
+ "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=",
+ "dev": true
+ }
+ }
+ },
"globals": {
"version": "11.9.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz",
@@ -4452,6 +4511,15 @@
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
"dev": true
},
+ "has-glob": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/has-glob/-/has-glob-0.1.1.tgz",
+ "integrity": "sha1-omHEwqbGZ+DHe3AKfyl8Oe86pYk=",
+ "dev": true,
+ "requires": {
+ "is-glob": "^2.0.1"
+ }
+ },
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
@@ -4514,6 +4582,15 @@
"integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==",
"dev": true
},
+ "homedir-polyfill": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
+ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=",
+ "dev": true,
+ "requires": {
+ "parse-passwd": "^1.0.0"
+ }
+ },
"hosted-git-info": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz",
@@ -4884,6 +4961,23 @@
"number-is-nan": "^1.0.0"
}
},
+ "is-glob": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
+ "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^1.0.0"
+ },
+ "dependencies": {
+ "is-extglob": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
+ "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=",
+ "dev": true
+ }
+ }
+ },
"is-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
@@ -4991,6 +5085,12 @@
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
},
+ "is-valid-glob": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-0.3.0.tgz",
+ "integrity": "sha1-1LVcafUYhvm2XHDWwmItN+KfSP4=",
+ "dev": true
+ },
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
@@ -5330,6 +5430,15 @@
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
"dev": true
},
+ "lazy-cache": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-2.0.2.tgz",
+ "integrity": "sha1-uRkKT5EzVGlIQIWfio9whNiCImQ=",
+ "dev": true,
+ "requires": {
+ "set-getter": "^0.1.0"
+ }
+ },
"lazystream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
@@ -5502,6 +5611,34 @@
"object-visit": "^1.0.0"
}
},
+ "matched": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/matched/-/matched-0.4.4.tgz",
+ "integrity": "sha1-Vte36xgDPwz5vFLrIJD6x9weifo=",
+ "dev": true,
+ "requires": {
+ "arr-union": "^3.1.0",
+ "async-array-reduce": "^0.2.0",
+ "extend-shallow": "^2.0.1",
+ "fs-exists-sync": "^0.1.0",
+ "glob": "^7.0.5",
+ "has-glob": "^0.1.1",
+ "is-valid-glob": "^0.3.0",
+ "lazy-cache": "^2.0.1",
+ "resolve-dir": "^0.1.0"
+ },
+ "dependencies": {
+ "extend-shallow": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
+ "requires": {
+ "is-extendable": "^0.1.0"
+ }
+ }
+ }
+ },
"math-random": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
@@ -6117,6 +6254,12 @@
"error-ex": "^1.2.0"
}
},
+ "parse-passwd": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
+ "dev": true
+ },
"parseqs": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
@@ -6891,6 +7034,16 @@
"path-parse": "^1.0.5"
}
},
+ "resolve-dir": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz",
+ "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=",
+ "dev": true,
+ "requires": {
+ "expand-tilde": "^1.2.2",
+ "global-modules": "^0.2.3"
+ }
+ },
"resolve-from": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
@@ -7034,6 +7187,15 @@
}
}
},
+ "rollup-plugin-multi-entry": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/rollup-plugin-multi-entry/-/rollup-plugin-multi-entry-2.0.2.tgz",
+ "integrity": "sha512-TY72fCVJvcEAQBpBzkXykoYQx2fz0B20EVtcbh0WZaYr5eBu3U1dRPzgMt6aO8MePWWOdcmgoBtG6PhmYJr4Ew==",
+ "dev": true,
+ "requires": {
+ "matched": "^0.4.4"
+ }
+ },
"rollup-plugin-node-resolve": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz",
@@ -7298,6 +7460,15 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"dev": true
},
+ "set-getter": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/set-getter/-/set-getter-0.1.0.tgz",
+ "integrity": "sha1-12nBgsnVpR9AkUXy+6guXoboA3Y=",
+ "dev": true,
+ "requires": {
+ "to-object-path": "^0.3.0"
+ }
+ },
"set-value": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
diff --git a/package.json b/package.json
index 65f38ca..b3701fe 100644
--- a/package.json
+++ b/package.json
@@ -53,6 +53,7 @@
"scripts": {
"build": "npm run fix && npm run rollup",
"build:polyfills": "npx rollup -c .config/rollup.polyfills.js",
+ "build:tests": "npx rollup -c rollup.tests.js",
"fix": "npx eslint ./src --fix",
"lint": "eslint ./src",
"rollup": "rollup -c .config/rollup.config.js",
@@ -96,6 +97,7 @@
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-filesize": "^5.0.1",
+ "rollup-plugin-multi-entry": "^2.0.2",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-terser": "^3.0.0",
"rollup-plugin-uglify": "^6.0.0",
diff --git a/rollup.tests.js b/rollup.tests.js
new file mode 100644
index 0000000..c821a79
--- /dev/null
+++ b/rollup.tests.js
@@ -0,0 +1,29 @@
+import babel from 'rollup-plugin-babel'
+import multiEntry from 'rollup-plugin-multi-entry'
+
+export default {
+ input: ['spec/setupBrowser.js', 'spec/spec/types/*.js'],
+ output: {
+ file: 'spec/es5TestBundle.js',
+ name: 'SVGTests',
+ sourceMap: true,
+ format: 'iife'
+ },
+ plugins: [
+ babel({
+ include: 'src/**',
+ runtimeHelpers: true,
+ babelrc: false,
+ presets: [["@babel/preset-env", {
+ modules: false,
+ }]],
+ // plugins: [["@babel/plugin-transform-runtime", {
+ // corejs: false,
+ // helpers: true,
+ // regenerator: true,
+ // useESModules: true
+ // }]]
+ }),
+ multiEntry()
+ ]
+}
diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html
index c24aac5..c0bea56 100644
--- a/spec/SpecRunner.html
+++ b/spec/SpecRunner.html
@@ -56,7 +56,9 @@
<!-- include spec files here... -->
- <script src="spec/adopter.js"></script>
+ <script src="es5TestBundle.js"></script>
+
+ <!-- <script src="spec/adopter.js"></script>
<script src="spec/arrange.js"></script>
<script src="spec/array.js"></script>
<script src="spec/bare.js"></script>
@@ -102,6 +104,6 @@
<script src="spec/morphing.js"></script>
<script src="spec/animator.js"></script>
<script src="spec/runner.js"></script>
- <script src="spec/queue.js"></script>
+ <script src="spec/queue.js"></script> -->
</body>
</html>