1
0
Fork 0

fix(plugin-grainline/plugin-cutonfold): Adapt to store methods

This adapts an early v3 idea to set grainline and cutOnFold data to use
the new store methods as added by plugin-cutlist.
This commit is contained in:
Joost De Cock 2022-09-08 09:05:04 +02:00
parent 55e5dc3d0c
commit 07b814c254
3 changed files with 17 additions and 8 deletions

View file

@ -1,12 +1,13 @@
import chai from 'chai'
import { round, Pattern } from '@freesewing/core'
import { round, Design } from '@freesewing/core'
import { plugin } from './dist/index.mjs'
const expect = chai.expect
describe('Grainline Plugin Tests', () => {
it('Should run the default grainline macro', () => {
const pattern = new Pattern().use(plugin)
const Pattern = new Design({ plugins: [ plugin ]})
const pattern = new Pattern()
pattern.parts.test = new pattern.Part()
pattern.parts.test.points.from = new pattern.Point(10, 20)
pattern.parts.test.points.to = new pattern.Point(10, 230)