Skip to content

Commit c21518c

Browse files
committed
fixed test cases
1 parent 2047e3f commit c21518c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/contentstack-config/test/unit/commands/region.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('Region command', function () {
4747
if (key === 'region') return undefined;
4848
return undefined;
4949
});
50-
sinon.stub(process, 'exit').callsFake((code) => {
50+
const exitStub = sinon.stub(process, 'exit').callsFake((code) => {
5151
throw new Error(`CLI_CONFIG_GET_REGION_NOT_FOUND EEXIT: ${code}`);
5252
});
5353
let result;
@@ -56,6 +56,7 @@ describe('Region command', function () {
5656
} catch (error) {
5757
result = error;
5858
}
59+
exitStub.restore();
5960
expect(result.message).to.include('CLI_CONFIG_GET_REGION_NOT_FOUND EEXIT: 1');
6061
});
6162

0 commit comments

Comments
 (0)