UNPKG

singularci

Version:

SingularCI is a DSL transpiler used to generate CI/CD configuration files for existing CI platforms

30 lines 1.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const BuildDockerImage_1 = require("../../../src/SemanticModel/Tasks/BuildDockerImage"); const TaskEnum_1 = require("../../../src/SemanticModel/Tasks/TaskEnum"); let buildDockerImage; const imageName = "testImageName"; const buildFilePath = "testBuildFilePath"; const userName = "testUserName"; const password = "testPassword"; beforeEach(() => { const buildDockerImageFactory = new BuildDockerImage_1.BuildDockerImageFactory(); buildDockerImage = buildDockerImageFactory.createBuildDockerImageTask(imageName, buildFilePath, userName, password); }); test('getImageName should be able to get the image name', () => { expect(buildDockerImage.getImageName()).toBe(imageName); }); test('getBuildFilePath should be able to get the build file path', () => { expect(buildDockerImage.getBuildFilePath()).toBe(buildFilePath); }); test('getUserName should be able to get the user name', () => { expect(buildDockerImage.getUserName()).toBe(userName); }); test('getPassword should be able to get the password', () => { expect(buildDockerImage.getPassword()).toBe(password); }); test('getType should be able to get the correct task type', () => { const localBuildDockerImage = new BuildDockerImage_1.BuildDockerImageFactory().createBuildDockerImageTask("", "", "", ""); expect(localBuildDockerImage.getType()).toBe(TaskEnum_1.TaskType.BuildDockerImage); }); //# sourceMappingURL=BuildDockerImage.test.js.map