UNPKG

@catladder/pipeline

Version:

Panter workflow for cloud CI/CD and DevOps

36 lines (35 loc) 918 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var testJob_1 = require("../testJob"); describe("createCustomTestJobs", function () { var baseContext = { name: "testComponent", environment: { jobOnlyVars: { build: {} } }, build: { config: { type: "custom", docker: { type: "custom" }, jobImage: "" } } }; it("throws error when not build type custom", function () { baseContext.build.config.type = "node"; expect(function () { return (0, testJob_1.createCustomTestJobs)(baseContext); }).toThrowError("deploy config is not custom"); baseContext.build.config.type = "custom"; }); it("returns empty array if no audit, lint, and test definition", function () { var jobs = (0, testJob_1.createCustomTestJobs)(baseContext); expect(jobs).toEqual([]); }); });