diff --git a/packages/contentstack-audit/src/audit-base-command.ts b/packages/contentstack-audit/src/audit-base-command.ts index 2312e43823..9a27de2be0 100644 --- a/packages/contentstack-audit/src/audit-base-command.ts +++ b/packages/contentstack-audit/src/audit-base-command.ts @@ -274,7 +274,6 @@ export abstract class AuditBaseCommand extends BaseCommand { if (['title', 'name', 'uid', 'content_types'].includes(key)) { return { @@ -350,7 +349,6 @@ export abstract class AuditBaseCommand extends BaseCommand[] = []; - for (const issue of missingRefs) { let row: Record = {}; diff --git a/packages/contentstack-audit/src/types/content-types.ts b/packages/contentstack-audit/src/types/content-types.ts index 835f3f63ac..8f4d614eef 100644 --- a/packages/contentstack-audit/src/types/content-types.ts +++ b/packages/contentstack-audit/src/types/content-types.ts @@ -50,6 +50,7 @@ type RefErrorReturnType = { tree: Record[]; uid?: string; content_types?: string[]; + title?: string; }; // NOTE Type 1 @@ -115,7 +116,7 @@ enum OutputColumn { 'Field type' = 'data_type', 'Missing references' = 'missingRefs', Path = 'treeStr', - content_types = 'content_types', + title = 'title', 'uid' = 'uid', 'missingCts' = 'content_types', } diff --git a/packages/contentstack-audit/test/unit/modules/extensions.test.ts b/packages/contentstack-audit/test/unit/modules/extensions.test.ts index 164391dbf3..23ad2a15b8 100644 --- a/packages/contentstack-audit/test/unit/modules/extensions.test.ts +++ b/packages/contentstack-audit/test/unit/modules/extensions.test.ts @@ -1,4 +1,3 @@ -import fs from 'fs'; import { resolve } from 'path'; import { fancy } from 'fancy-test'; import { expect } from '@oclif/test'; @@ -8,12 +7,8 @@ import { ux } from '@contentstack/cli-utilities'; import config from '../../../src/config'; import { Extensions } from '../../../src/modules'; import { $t, auditMsg } from '../../../src/messages'; -import { values } from 'lodash'; -// import { spy } from '@contentstack/cli-dev-dependencies'; import sinon from 'sinon'; -// import extensionsExamples from './../mock/contents/extensions/extensions.json'; import { Extension } from '../../../src/types'; -// import { join } from 'path'; describe('Extensions scope containing content_types uids', () => { describe('run method with invalid path for extensions', () => { @@ -51,7 +46,7 @@ describe('Extensions scope containing content_types uids', () => { .it( 'should expect missingRefs equal to empty array, expect entire workflow schema and empty missingCts', async () => { - const missingRefs = await ext.run(); + await ext.run(); expect(ext.missingCtInExtensions).eql([ { stackHeaders: { @@ -162,7 +157,7 @@ describe('Extensions scope containing content_types uids', () => { .it( 'should expect missingRefs equal to empty array, expect entire workflow schema and empty missingCts', async () => { - const missingRefs = await ext.run(); + await ext.run(); expect(ext.missingCtInExtensions).eql([]); expect(ext.missingCts).eql(new Set([])); },