From 9c1741aac5d2876fddfe022d7f5ca90f0253bb16 Mon Sep 17 00:00:00 2001 From: Ayo Date: Thu, 25 Jun 2026 08:51:09 +0200 Subject: [PATCH] tests: update paths --- tests/prep-now.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/prep-now.test.ts b/tests/prep-now.test.ts index 9f33aef..3506e0b 100644 --- a/tests/prep-now.test.ts +++ b/tests/prep-now.test.ts @@ -5,7 +5,7 @@ import { dirname, resolve } from 'node:path' import { describe, it, expect, vi, beforeEach } from 'vitest' import { consola } from 'consola' -import newNow from '../commands/prep-now' +import newNow from '../scripts/prep-now' // Mock file system operations vi.mock('path', () => ({ @@ -27,7 +27,7 @@ vi.mock('consola', () => ({ })) // Mock mdToHTML -vi.mock('../command/md-to-html', () => ({ +vi.mock('../scripts/md-to-html', () => ({ mdToHTML: vi.fn(), })) @@ -56,7 +56,7 @@ describe('prep-now', () => { it('should create a new now page and clear the original files', async () => { // Mock the mdToHTML function - const { mdToHTML } = await import('../utils/md-to-html') + const { mdToHTML } = await import('../scripts/md-to-html') vi.mocked(mdToHTML).mockResolvedValue('

Test Content

') // Mock file paths @@ -73,8 +73,8 @@ describe('prep-now', () => { .mockReturnValueOnce('# Test Content') // Mock file paths - const __filename = '/src/commands/prep-now.ts' - const __dirname = '/src/commands' + const __filename = '/src/scripts/prep-now.ts' + const __dirname = '/src/scripts' vi.mocked(fileURLToPath).mockReturnValue(__filename) vi.mocked(dirname).mockReturnValue(__dirname)