From 9582fd47449cf8d1e73dc916e0234849fcd3b464 Mon Sep 17 00:00:00 2001 From: Breno A Date: Thu, 9 May 2024 05:09:35 -0300 Subject: [PATCH] tests: not needed example --- __tests__/example.test.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 __tests__/example.test.ts diff --git a/__tests__/example.test.ts b/__tests__/example.test.ts deleted file mode 100644 index fd4a6c7..0000000 --- a/__tests__/example.test.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { processFiles } from '../src/utils/FileProcessor'; -import fs from 'fs'; -import { getFilesByExtension } from "../src/utils/ExtensionFilter"; - -jest.mock("fs", () => ({ - promises: { - access: jest.fn() - } -})); -const extension = ".prp"; -const dir = "."; -describe('FileProcessor Example', () => { - describe('processFiles in real path', () => { - it('should process .prp.md files in example/ directory', () => { - const files = getFilesByExtension({ dir, extension }) - const variables = new Map(); - variables.set('what', 'Hello'); - variables.set('EXAMPLE', 'World'); - const encodings = 'utf8' as BufferEncoding; - - processFiles({ files, variables, encodings, extension }); - files.forEach(file => { - const content = fs.readFileSync(file.replace(extension, ""), { encoding: 'utf8' }); - expect(content).not.toContain('{_EXAMPLE_}'); - expect(content).not.toContain('{_what_}'); - }); - }); - }); -}); \ No newline at end of file