@nxextensions/firebase-cypress
Version:
An NX Plugin for Firebase Applications that would like to use emulators for E2E testing with Cypress
22 lines • 914 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const run_cypress_1 = tslib_1.__importDefault(require("../../utils/run-cypress"));
const firebase_v2_1 = require("../../utils/firebase-v2");
const runExecutor = async (options, context) => {
validateOptions(options);
try {
await (0, firebase_v2_1.startFirebaseServer)(context);
return await (0, run_cypress_1.default)(options, context);
}
finally {
await (0, firebase_v2_1.terminateFirebaseServer)(context);
}
};
function validateOptions(options) {
if (!options.devServerTarget && !options.webServerCommand) {
throw new Error('Invalid command: Either devServerTarget or webServerCommand must be provided. This can be configured in cypress.config.ts, or in project.json');
}
}
exports.default = runExecutor;
//# sourceMappingURL=executor.js.map