fix: Exclude non-garments from certain pattern tests
This commit is contained in:
parent
ef3bd03e2c
commit
0ac3358350
1 changed files with 42 additions and 32 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
const notGarments = [
|
||||||
|
'rendertest',
|
||||||
|
'tutorial',
|
||||||
|
'examples',
|
||||||
|
'legend',
|
||||||
|
]
|
||||||
|
const isGarment = design => (notGarments.indexOf(design) === -1) true : false
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This runs unit tests for the pattern configuration
|
* This runs unit tests for the pattern configuration
|
||||||
* It expects the following:
|
* It expects the following:
|
||||||
|
@ -30,6 +39,8 @@ const testPatternConfig = (design, pattern, expect, models, patterns) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// Config tests for garments only
|
||||||
|
if (isGarment(design)) {
|
||||||
it(` - 'type' should be 'pattern' or 'block'`, () => {
|
it(` - 'type' should be 'pattern' or 'block'`, () => {
|
||||||
expect(['pattern', 'block'].indexOf(pattern.config.type)).to.not.equal(-1)
|
expect(['pattern', 'block'].indexOf(pattern.config.type)).to.not.equal(-1)
|
||||||
})
|
})
|
||||||
|
@ -67,7 +78,6 @@ const testPatternConfig = (design, pattern, expect, models, patterns) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (['rendertest', 'tutorial', 'examples', 'legend'].indexOf(design) === -1) {
|
|
||||||
/*
|
/*
|
||||||
* Ensure pattern is listed as being for breasts or not
|
* Ensure pattern is listed as being for breasts or not
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue