UNPKG

@testplane/storybook

Version:

Testplane plugin that enables runtime screenshot storybook tests autogeneration

20 lines 726 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extendedIt = exports.nestedDescribe = void 0; function nestedDescribe(story, fn) { const pathSegments = story.title.split("/").concat(story.name).reverse(); const describeCallback = pathSegments.reduce((acc, val) => { return function () { describe(val, acc); }; }, fn); describeCallback(); } exports.nestedDescribe = nestedDescribe; function extendedIt(story, testName, cb) { const skipableIt = (story.skip ? it.skip : it); story.browserIds && testplane.only.in(story.browserIds); skipableIt(testName, cb); } exports.extendedIt = extendedIt; //# sourceMappingURL=test-decorators.js.map