1
0
Fork 0

Test fixes

This commit is contained in:
Wouter van Wageningen 2023-04-20 18:55:07 +00:00
parent 9ed72e9f45
commit 0213c92b0f
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ pattern.draft().render()
describe('Buttons Plugin Test', () => {
for (const snippet of ['button', 'buttonhole', 'snap-stud', 'snap-socket']) {
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)
})
}

View file

@ -9,7 +9,7 @@ describe('Logo Plugin Tests', () => {
const Pattern = new Design()
const pattern = new Pattern().use(annotationsPlugin)
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"'
)
})

View file

@ -17,11 +17,11 @@ pattern.draft().render()
describe('Notches Plugin Test', () => {
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`, () => {
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', () => {