From 8d57429a6425253dbab4c45359c8aa431e9d7f94 Mon Sep 17 00:00:00 2001 From: Nicolas C Date: Wed, 16 Oct 2024 09:45:33 +0200 Subject: [PATCH] fix(extraction test): remove manual copies of 'existing' --- packages/cli/test/index.test.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/cli/test/index.test.ts b/packages/cli/test/index.test.ts index b83e7668b..ad4b5f5c7 100644 --- a/packages/cli/test/index.test.ts +++ b/packages/cli/test/index.test.ts @@ -4,8 +4,8 @@ import extractExperimentalCommand from "../src/lingui-extract-experimental" import { command as compileCommand } from "../src/lingui-compile" import fs from "fs/promises" import os from "os" -import nodepath from "path" import glob from "glob" +import nodepath from "path" import { makeConfig } from "@lingui/conf" import { listingToHumanReadable, readFsToJson } from "../src/tests" import { getConsoleMockCalls, mockConsole } from "@lingui/jest-mocks" @@ -33,7 +33,7 @@ async function prepare(caseFolderName: string) { if (glob.sync(existingPath).length === 1) { await fs.cp(existingPath, actualPath, { recursive: true }) } - + return { rootDir, actualPath, existingPath, expectedPath } } @@ -180,12 +180,6 @@ describe("E2E Extractor Test", () => { "extractor-experimental" ) - await fs.cp( - nodepath.join(rootDir, "existing"), - nodepath.join(rootDir, "actual"), - { recursive: true } - ) - await mockConsole(async (console) => { const config = makeConfig({ rootDir: rootDir, @@ -240,12 +234,6 @@ describe("E2E Extractor Test", () => { "extractor-experimental-clean" ) - await fs.cp( - nodepath.join(rootDir, "existing"), - nodepath.join(rootDir, "actual"), - { recursive: true } - ) - await mockConsole(async (console) => { const result = await extractExperimentalCommand( makeConfig({