Skip to content

Commit 7824561

Browse files
Fix: fixed merge conflits
2 parents 7076975 + 2a0f09e commit 7824561

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/contentstack-audit/test/unit/modules/content-types.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ describe('Content types', () => {
152152
.stub(cliux, 'confirm', async () => true)
153153
.it('should not write the file', async () => {
154154
const ctInstance = new ContentType({ ...constructorParam, fix: true });
155-
(ctInstance as any).schema = [constructorParam.ctSchema[0]];
155+
(ctInstance as any).schema = constructorParam.ctSchema?.length ? [constructorParam.ctSchema[0]] : [];
156156
const fsSpy = sinon.spy(fs, 'writeFileSync');
157157
await ctInstance.writeFixContent();
158158
expect(fsSpy.callCount).to.be.equals(1);

packages/contentstack-audit/test/unit/modules/field-rules.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('Field Rules', () => {
147147
.stub(cliux, 'confirm', async () => true)
148148
.it('should not write the file', async () => {
149149
const ctInstance = new FieldRule({ ...constructorParam, fix: true });
150-
(ctInstance as any).schema = [constructorParam.ctSchema[0]];
150+
(ctInstance as any).schema = constructorParam.ctSchema?.length ? [constructorParam.ctSchema[0]] : [];
151151
const fsSpy = sinon.spy(fs, 'writeFileSync');
152152
await ctInstance.writeFixContent();
153153
expect(fsSpy.callCount).to.be.equals(1);

0 commit comments

Comments
 (0)