Test fixes
This commit is contained in:
parent
9ed72e9f45
commit
0213c92b0f
3 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ pattern.draft().render()
|
||||||
describe('Buttons Plugin Test', () => {
|
describe('Buttons Plugin Test', () => {
|
||||||
for (const snippet of ['button', 'buttonhole', 'snap-stud', 'snap-socket']) {
|
for (const snippet of ['button', 'buttonhole', 'snap-stud', 'snap-socket']) {
|
||||||
it(`Should add the ${snippet} snippet to defs`, () => {
|
it(`Should add the ${snippet} snippet to defs`, () => {
|
||||||
expect(pattern.svg.defs.indexOf(`<g id="${snippet}">`)).to.not.equal(-1)
|
expect(pattern.svg.defs.render().indexOf(`<g id="${snippet}">`)).to.not.equal(-1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe('Logo Plugin Tests', () => {
|
||||||
const Pattern = new Design()
|
const Pattern = new Design()
|
||||||
const pattern = new Pattern().use(annotationsPlugin)
|
const pattern = new Pattern().use(annotationsPlugin)
|
||||||
pattern.draft().render()
|
pattern.draft().render()
|
||||||
expect(pattern.svg.defs).to.contain(
|
expect(pattern.svg.defs.render()).to.contain(
|
||||||
'<g id="logo" transform="scale(1) translate(-23 -36)"><path class="logo"'
|
'<g id="logo" transform="scale(1) translate(-23 -36)"><path class="logo"'
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
@ -17,11 +17,11 @@ pattern.draft().render()
|
||||||
|
|
||||||
describe('Notches Plugin Test', () => {
|
describe('Notches Plugin Test', () => {
|
||||||
it(`Should add the snippets to defs`, () => {
|
it(`Should add the snippets to defs`, () => {
|
||||||
expect(pattern.svg.defs).to.contain('<g id="notch">')
|
expect(pattern.svg.defs.render()).to.contain('<g id="notch">')
|
||||||
})
|
})
|
||||||
|
|
||||||
it(`Should add the notches snippet to defs`, () => {
|
it(`Should add the notches snippet to defs`, () => {
|
||||||
expect(pattern.svg.defs.indexOf(`<g id="notch">`)).to.not.equal(-1)
|
expect(pattern.svg.defs.render().indexOf(`<g id="notch">`)).to.not.equal(-1)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Draws a notch on an anchor point', () => {
|
it('Draws a notch on an anchor point', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue