chore(plugin-bust): Ported to v3
This commit is contained in:
parent
38519b6aba
commit
28bb04d5a5
3 changed files with 10 additions and 15 deletions
|
@ -10,8 +10,8 @@ const measurements = {
|
|||
}
|
||||
|
||||
const Pattern = new Design()
|
||||
const pattern = new Pattern({ measurements } ).use(plugin)
|
||||
pattern.apply({measurements}).draft().render()
|
||||
const pattern = new Pattern({ measurements }).use(plugin)
|
||||
pattern.draft()
|
||||
|
||||
describe('Bust plugin Tests', () => {
|
||||
it('Should set swap the chest measurements', () => {
|
||||
|
@ -22,25 +22,24 @@ describe('Bust plugin Tests', () => {
|
|||
it('Should copy measurement from chest to bust and from highBust to chest', function () {
|
||||
const testPattern = new Design({
|
||||
measurements: {},
|
||||
plugins: [ plugin ]
|
||||
plugins: [plugin],
|
||||
})
|
||||
const pattern = new testPattern()
|
||||
const userMeasurements = {chest: 50, highBust: 60}
|
||||
pattern.settings.measurements = userMeasurements;
|
||||
const userMeasurements = { chest: 50, highBust: 60 }
|
||||
pattern.settings.measurements = userMeasurements
|
||||
pattern.draft()
|
||||
expect(pattern.settings.measurements.bust).to.equal(50)
|
||||
expect(pattern.settings.measurements.chest).to.equal(60)
|
||||
})
|
||||
|
||||
it('Should not overwrite existing bust measurements', function () {
|
||||
let config = {measurements:{}}
|
||||
const testPattern = new Design(config,plugin)
|
||||
let config = { measurements: {} }
|
||||
const testPattern = new Design(config, plugin)
|
||||
let pattern = new testPattern()
|
||||
let userMeasurements = {chest: 50, highBust: 60, bust: 55}
|
||||
let userMeasurements = { chest: 50, highBust: 60, bust: 55 }
|
||||
pattern.settings.measurements = userMeasurements
|
||||
pattern.draft()
|
||||
expect(pattern.settings.measurements.bust).to.equal(55)
|
||||
expect(pattern.settings.measurements.chest).to.equal(50)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue