chore(plugin-notches): Ported to v3
This commit is contained in:
parent
e843144355
commit
fcea467c8e
6 changed files with 37 additions and 29 deletions
|
@ -1,10 +1,10 @@
|
|||
import chai from 'chai'
|
||||
import freesewing from '@freesewing/core'
|
||||
import plugin from '../dist/index.mjs'
|
||||
import { Pattern } from '@freesewing/core'
|
||||
import { plugin } from '../dist/index.mjs'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
const pattern = new freesewing.Pattern().use(plugin)
|
||||
const pattern = new Pattern().use(plugin)
|
||||
pattern.draft().render()
|
||||
|
||||
describe('Notches Plugin Test', () => {
|
||||
|
@ -17,13 +17,13 @@ describe('Notches Plugin Test', () => {
|
|||
})
|
||||
|
||||
it("Draws a notch on an anchor point", () => {
|
||||
let pattern = new freesewing.Pattern()
|
||||
const pattern = new Pattern()
|
||||
pattern.use(plugin)
|
||||
pattern.parts.test = new pattern.Part()
|
||||
let { Point, snippets, Snippet } = pattern.parts.test.shorthand()
|
||||
const { Point, snippets, Snippet } = pattern.parts.test.shorthand()
|
||||
snippets.button = new Snippet('notch', new Point(10,20))
|
||||
pattern.render()
|
||||
let c = pattern.svg
|
||||
const c = pattern.svg
|
||||
expect(c.layout.test.svg).to.contain('<use x="10" y="20" xlink:href="#notch"')
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue