Skip to content

Commit e088fdc

Browse files
Merge branch 'development' of github.com:contentstack/contentstack-apps-cli into development
2 parents 9359ad3 + 2730a5b commit e088fdc

9 files changed

Lines changed: 621 additions & 89 deletions

File tree

.github/workflows/secrets-scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

package-lock.json

Lines changed: 64 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"eslint-config-oclif-typescript": "^1.0.3",
4444
"mocha": "^10.2.0",
4545
"nyc": "^15.1.0",
46-
"oclif": "^3.9.1",
46+
"oclif": "^3.10.0",
4747
"shx": "^0.3.4",
4848
"ts-node": "^10.9.1",
4949
"tslib": "^2.5.3",
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import { PassThrough } from "stream";
88
import { expect, test } from "@oclif/test";
99
import { cliux, ux, configHandler } from "@contentstack/cli-utilities";
1010

11-
import config from "../../../src/config";
12-
import messages from "../../../src/messages";
13-
import * as mock from "../mock/create.mock.json";
14-
import manifestData from "../../../src/config/manifest.json";
11+
import config from "../../../../src/config";
12+
import messages from "../../../../src/messages";
13+
import * as mock from "../../mock/common.mock.json";
14+
import manifestData from "../../../../src/config/manifest.json";
1515

1616
const gitHubHost = "https://github.com";
1717
const zipPath = join(process.cwd(), "test", "unit", "mock", "boilerplate.zip");
@@ -206,9 +206,10 @@ describe("app:create", () => {
206206
.reply(200, { organizations: mock.organizations })
207207
)
208208
.command(["app:create", "--data-dir", process.cwd()])
209-
.do(({ stdout }) =>
210-
expect(stdout).to.contain(messages.FILE_GENERATION_FAILURE)
211-
)
209+
.exit(1)
210+
.do(({ stdout }) => {
211+
expect(stdout).to.includes(messages.FILE_GENERATION_FAILURE);
212+
})
212213
.it("Boilerplate clone exits with status code 1");
213214
});
214215

@@ -236,6 +237,7 @@ describe("app:create", () => {
236237
api.post("/manifests", { ...manifestData, name: "test-app" }).reply(400)
237238
)
238239
.command(["app:create", "--data-dir", process.cwd()])
240+
.exit(1)
239241
.do(({ stdout }) =>
240242
expect(stdout).to.contain(messages.APP_CREATION_CONSTRAINT_FAILURE)
241243
)
@@ -272,6 +274,7 @@ describe("app:create", () => {
272274
"--config",
273275
resolve(process.cwd(), "test", "unit", "mock", "config.json"),
274276
])
277+
.exit(1)
275278
.do(({ stdout }) =>
276279
expect(stdout).to.contain(messages.APP_CREATION_CONSTRAINT_FAILURE)
277280
)
@@ -320,6 +323,7 @@ describe("app:create", () => {
320323
})
321324
)
322325
.command(["app:create", "--data-dir", process.cwd()])
326+
.exit(1)
323327
.do(({ stdout }) =>
324328
expect(stdout).to.contain("Dependency installation failed.!")
325329
)

0 commit comments

Comments
 (0)