Skip to content

Commit a58fde9

Browse files
committed
fixed audit tests and removed commented code
1 parent 1befda3 commit a58fde9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { resolve } from 'path';
44
import { fancy } from 'fancy-test';
55
import { expect } from 'chai';
66
import cloneDeep from 'lodash/cloneDeep';
7-
import { ux } from '@contentstack/cli-utilities';
7+
import { cliux } from '@contentstack/cli-utilities';
88

99
import config from '../../../src/config';
1010
import { ContentType } from '../../../src/modules';
@@ -137,7 +137,7 @@ describe('Content types', () => {
137137
fancy
138138
.stdout({ print: process.env.PRINT === 'true' || false })
139139
.stub(fs, 'writeFileSync', () => {})
140-
.stub(ux, 'confirm', async () => true)
140+
.stub(cliux, 'confirm', async () => true)
141141
.it('should not write the file', async () => {
142142
const ctInstance = new ContentType({ ...constructorParam, fix: true });
143143
const fsSpy = sinon.spy(fs, 'writeFileSync');
@@ -149,9 +149,9 @@ describe('Content types', () => {
149149
.stdout({ print: process.env.PRINT === 'true' || false })
150150
.stub(fs, 'writeFileSync', () => {})
151151
.it('should prompt and ask confirmation', async () => {
152-
sinon.replace(ux, 'confirm', async () => false);
152+
sinon.replace(cliux, 'confirm', async () => false);
153153
const ctInstance = new ContentType({ ...constructorParam, fix: true });
154-
const spy = sinon.spy(ux, 'confirm');
154+
const spy = sinon.spy(cliux, 'confirm');
155155
await ctInstance.writeFixContent();
156156
expect(spy.callCount).to.be.equals(1);
157157
});

0 commit comments

Comments
 (0)