1
0
Fork 0

fix(core): Svg tests

This commit is contained in:
Joost De Cock 2021-04-22 19:29:37 +02:00
parent 29551b8a34
commit eda88bce4d
2 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
var version = require("../../package.json").version; var version = require('../../package.json').version
var render = { var render = {
boilerplate: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg boilerplate: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
@ -91,7 +91,7 @@ var render = {
<!-- end of group #fs-container --> <!-- end of group #fs-container -->
</svg>`, </svg>`,
path: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg path: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.45" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.451075975520425"
> >
<style type="text/css"> <![CDATA[ <style type="text/css"> <![CDATA[
@ -233,7 +233,7 @@ var render = {
<!-- end of group #fs-container --> <!-- end of group #fs-container -->
</svg>`, </svg>`,
textOnPath: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg textOnPath: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.45" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.451075975520425"
> >
<style type="text/css"> <![CDATA[ <style type="text/css"> <![CDATA[
@ -262,7 +262,7 @@ var render = {
<!-- end of group #fs-container --> <!-- end of group #fs-container -->
</svg>`, </svg>`,
textOnPathCenter: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg textOnPathCenter: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.45" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.451075975520425"
> >
<style type="text/css"> <![CDATA[ <style type="text/css"> <![CDATA[
@ -291,7 +291,7 @@ var render = {
<!-- end of group #fs-container --> <!-- end of group #fs-container -->
</svg>`, </svg>`,
textOnPathRight: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg textOnPathRight: `<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg
xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.45" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en" xmlns:freesewing="http://freesewing.org/namespaces/freesewing" freesewing="${version}" width="44mm" height="56.45mm" viewBox="0 0 44 56.451075975520425"
> >
<style type="text/css"> <![CDATA[ <style type="text/css"> <![CDATA[
@ -346,6 +346,6 @@ var render = {
</g> </g>
<!-- end of group #fs-container --> <!-- end of group #fs-container -->
</svg>` </svg>`
}; }
module.exports = render; module.exports = render

View file

@ -1,10 +1,10 @@
let version = require("../package.json").version; const version = require("../package.json").version;
let render = require("./fixtures/render.js"); const render = require("./fixtures/render.js");
let expect = require("chai").expect; const expect = require("chai").expect;
let chai = require("chai"); const chai = require("chai");
chai.use(require("chai-string")); chai.use(require("chai-string"));
let freesewing = require("./dist"); const freesewing = require("./dist");
var round = freesewing.utils.round; const round = freesewing.utils.round;
it("Svg constructor should initialize object", () => { it("Svg constructor should initialize object", () => {
let pattern = new freesewing.Pattern(); let pattern = new freesewing.Pattern();