1
0
Fork 0

fix(test): Load models from method param

This commit is contained in:
joostdecock 2021-09-12 13:28:44 +02:00
parent 1ca97116a0
commit 0fcb91c379
3 changed files with 37 additions and 30 deletions

View file

@ -1,4 +1,4 @@
const nonHuman = require('./non-human-measurements.js')
const nonHumanMeasurements = require('./non-human-measurements.js')
/*
* This runs unit tests for pattern sampling
* It expects the following:
@ -11,6 +11,8 @@ const nonHuman = require('./non-human-measurements.js')
* @param object patterns: Imported @freesewing/pattern-info
*/
const testPatternSampling = (design, Pattern, expect, models, patterns) => {
// Load non-human measurements
const nonHuman = nonHumanMeasurements(models)
// Helper method to try/catch pattern sampling
const doesItSample = (pattern, log=false) => {