diff --git a/test/unit/index.js b/test/unit/index.js index a7476a69..cde49f51 100644 --- a/test/unit/index.js +++ b/test/unit/index.js @@ -39,7 +39,7 @@ require('./team-test') require('./team-users-test') require('./team-stack-role-mapping-test') require('./managementToken-test') -require('./ungroupedVariants-test') require('./variantGroup-test') +require('./ungroupedVariants-test') require('./variantsWithVariantsGroup-test') require('./variants-entry-test') diff --git a/test/unit/ungroupedVariants-test.js b/test/unit/ungroupedVariants-test.js index e26ade1f..c67e0a55 100644 --- a/test/unit/ungroupedVariants-test.js +++ b/test/unit/ungroupedVariants-test.js @@ -162,6 +162,9 @@ function makeVariants (data = {}) { } function checkVariants (variants) { + if(variants.variants){ + variants = variants.variants + } checkSystemFields(variants) expect(variants.name).to.be.equal('name') } diff --git a/test/unit/variantGroup-test.js b/test/unit/variantGroup-test.js index 8d61c969..ecdb5205 100644 --- a/test/unit/variantGroup-test.js +++ b/test/unit/variantGroup-test.js @@ -159,6 +159,9 @@ function makeVariantGroup (data = {}) { } function checkVariantGroup (variantGroup) { + if(variantGroup.variant_group){ + variantGroup = variantGroup.variant_group + } checkSystemFields(variantGroup) expect(variantGroup.name).to.be.equal('Test') expect(variantGroup.source).to.be.equal('Personalize') diff --git a/test/unit/variantsWithVariantsGroup-test.js b/test/unit/variantsWithVariantsGroup-test.js index dea369d2..f441dedc 100644 --- a/test/unit/variantsWithVariantsGroup-test.js +++ b/test/unit/variantsWithVariantsGroup-test.js @@ -135,6 +135,9 @@ function makeVariants (data = {}) { } function checkVariants (variant) { + if(variant.variants){ + variant = variant.variants + } checkSystemFields(variant) expect(variant.name).to.be.equal('Test') expect(variant.uid).to.be.equal('UID')