UNPKG

@nx/cypress

Version:

The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.

19 lines (18 loc) 733 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUnscopedLibName = getUnscopedLibName; exports.getE2eProjectName = getE2eProjectName; exports.filePathPrefix = filePathPrefix; const devkit_1 = require("@nx/devkit"); function getUnscopedLibName(libRoot) { return libRoot.slice(libRoot.lastIndexOf('/') + 1); } function getE2eProjectName(targetProjectName, targetLibRoot, cypressDirectory) { if (cypressDirectory) { return `${filePathPrefix(cypressDirectory)}-${getUnscopedLibName(targetLibRoot)}-e2e`; } return `${targetProjectName}-e2e`; } function filePathPrefix(directory) { return `${(0, devkit_1.names)(directory).fileName}`.replace(new RegExp('/', 'g'), '-'); }