UNPKG

jest-cucumber

Version:
25 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var src_1 = require("../../../../src/"); var certificate_factory_1 = require("../../src/certificate-factory"); var feature = src_1.loadFeature('./examples/typescript/specs/features/using-docstrings.feature'); src_1.defineFeature(feature, function (test) { var certificateFactory; var certificate; beforeEach(function () { certificateFactory = new certificate_factory_1.CertificateFactory(); }); test('Print a certificate', function (_a) { var given = _a.given, when = _a.when, then = _a.then; given(/^(.*) (.*) has achieved a ([0-9]*)$/, function (title, lastName, score) { certificateFactory.setReceiver(title, lastName, score); }); when(/^I print the certificate$/, function () { certificate = certificateFactory.printCertificate(); }); then(/^It prints$/, function (expectedCertificate) { expect(certificate).toBe(expectedCertificate); }); }); }); //# sourceMappingURL=using-docstrings.steps.js.map