1
0
Fork 0

Merge branch 'develop' into octoplushie

This commit is contained in:
Joost De Cock 2022-07-31 15:25:40 +02:00 committed by GitHub
commit 3ac64f9458
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 252 additions and 59 deletions

View file

@ -712,3 +712,21 @@ it("Should handle a list snapped option", () => {
});
it("Should retrieve the cutList", () => {
const Test = new freesewing.Design({
name: "test",
parts: ['front'],
})
Test.prototype.draftFront = function(part) {
part.addCut(4, 'lining', true)
return part
};
const pattern = new Test()
expect(JSON.stringify(pattern.getCutList())).to.equal(JSON.stringify({}))
pattern.draft()
console.log(pattern.parts.front.cut)
const list = `{"front":{"grain":90,"materials":{"lining":{"cut":4,"identical":true}}}}`
expect(JSON.stringify(pattern.getCutList())).to.equal(list)
});