UNPKG

@jameslnewell/buildkite-pipelines

Version:
34 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const CommandStep_1 = require("./CommandStep"); const GroupStep_1 = require("./GroupStep"); describe(GroupStep_1.GroupStep.name, () => { const label = 'Testing Steps'; const step = new CommandStep_1.CommandStep().addCommand('yarn run test'); test('has label key', async () => { const group = new GroupStep_1.GroupStep().setLabel(label).addStep(step); const object = await group.build(); expect(object).toHaveProperty('label', label); }); test('has group key', async () => { const group = new GroupStep_1.GroupStep().setLabel(label).addStep(step); const object = await group.build(); expect(object).toHaveProperty('group', label); }); test('has steps added various different ways', async () => { const checkStep = new CommandStep_1.CommandStep().addCommand('yarn run check'); const buildStep = new CommandStep_1.CommandStep().addCommand('yarn run build'); const testStep = new CommandStep_1.CommandStep().addCommand('yarn run test'); const group = new GroupStep_1.GroupStep() .setLabel(label) .steps([checkStep, buildStep]) .addStep(testStep); const object = await group.build(); expect(object).toHaveProperty('steps', expect.arrayContaining([ await checkStep.build(), await buildStep.build(), await testStep.build(), ])); }); }); //# sourceMappingURL=GroupStep.test.js.map