UNPKG

e2ed

Version:

E2E testing framework over Playwright

18 lines (17 loc) 947 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.writeNotIncludedInPackTest = void 0; const promises_1 = require("node:fs/promises"); const internal_1 = require("../../constants/internal"); const asserts_1 = require("../asserts"); const readNotIncludedInPackTests_1 = require("./readNotIncludedInPackTests"); /** * Writes test to not included in pack tests. * @internal */ const writeNotIncludedInPackTest = async (testFilePath) => { const notIncludedInPackTests = await (0, readNotIncludedInPackTests_1.readNotIncludedInPackTests)(); (0, asserts_1.assertValueIsFalse)(notIncludedInPackTests.includes(testFilePath), 'There is no duplicate test file path in not included in pack tests', { notIncludedInPackTests, testFilePath }); await (0, promises_1.appendFile)(internal_1.NOT_INCLUDED_IN_PACK_TESTS_PATH, `${testFilePath}\n`); }; exports.writeNotIncludedInPackTest = writeNotIncludedInPackTest;