diff --git a/wherehows-web/app/constants/dataset-compliance.ts b/wherehows-web/app/constants/dataset-compliance.ts index 95e352d905..ac2c7ea74c 100644 --- a/wherehows-web/app/constants/dataset-compliance.ts +++ b/wherehows-web/app/constants/dataset-compliance.ts @@ -93,12 +93,10 @@ const complianceSteps = { /** * Takes a map of dataset options and constructs the relevant compliance edit wizard steps to build the wizard flow - * @param {{ hasSchema: boolean }} [{ hasSchema }={ hasSchema: true }] flag indicating if the dataset is schema-less - * @returns {([x: number]: {name: string})} + * @param {boolean} [hasSchema=true] flag indicating if the dataset has a schema or otherwise + * @returns {({ [x: number]: { name: string } })} */ -const getComplianceSteps = ( - { hasSchema }: { hasSchema: boolean } = { hasSchema: true } -): { [x: number]: { name: string } } => { +const getComplianceSteps = (hasSchema: boolean = true): { [x: number]: { name: string } } => { // Step to tag dataset with PII data, this is at the dataset level for schema-less datasets const piiTaggingStep = { 0: { name: 'editDatasetLevelCompliancePolicy' } }; diff --git a/wherehows-web/tests/unit/constants/dataset-compliance-test.js b/wherehows-web/tests/unit/constants/dataset-compliance-test.js index 2ef7c78401..18aa929331 100644 --- a/wherehows-web/tests/unit/constants/dataset-compliance-test.js +++ b/wherehows-web/tests/unit/constants/dataset-compliance-test.js @@ -19,7 +19,7 @@ test('getComplianceSteps function should behave as expected', function(assert) { assert.deepEqual(result, complianceSteps, 'getComplianceSteps result is expected shape when no args are passed'); - result = getComplianceSteps({ hasSchema: false }); + result = getComplianceSteps(false); assert.deepEqual( result, { ...complianceSteps, ...piiTaggingStep },