Skip to content

Reconcile @repo/template tests on Windows #32

@omargfh

Description

@omargfh

Currently, @repo/template package fails some of its tests on Windows despite exhibiting correct behavior. These tests assume POSIX path notation. A dump is provided below.

 PASS  tests/api.schemas.test.ts
  api.schemas
    PageResult type
      √ should support minimal page result with required fi
elds (59 ms)
      √ should support full page result with all fields (15
 ms)
      √ should support failed page result with error (64 ms
)
      √ should support partial failure with output but erro
r (3 ms)
      √ should support different languages (3 ms)
    BuildResult type
      √ should support minimal build result (3 ms)
      √ should support successful build result with pages (
3 ms)
      √ should support failed build result with errors (4 m
s)
      √ should support complete failure (1 ms)
      √ should support multi-language builds (4 ms)
      √ should support builds with metadata paths (6 ms)
      √ should support large builds with many pages (2 ms)
    Type compatibility
      √ should handle PageResult with optional fields as un
defined (8 ms)
      √ should handle BuildResult with optional stats as un
defined
      √ should support empty pages object (2 ms)
      √ should support empty errors array (5 ms)

 PASS  tests/utils.test.ts
  utils
    joinIgnoreNone
      √ should join strings with default separator (21 ms)
      √ should join strings with custom separator (1 ms)
      √ should ignore null values (21 ms)
      √ should ignore undefined values (5 ms)
      √ should ignore empty strings (13 ms)
      √ should handle all falsy values (4 ms)
      √ should return empty string for all falsy values (5
ms)
      √ should handle empty array (2 ms)
      √ should preserve zero values (1 ms)
      √ should handle mixed types correctly (2 ms)
    isURL
      √ should return true for http URLs (17 ms)
      √ should return true for https URLs (8 ms)
      √ should return true for URLs with different cases (3
 ms)
      √ should return false for non-URLs (1 ms)
      √ should return false for empty or invalid strings (3
 ms)
      √ should handle URLs with query parameters and fragme
nts (3 ms)
    readRemote
      √ should fetch data from remote URL (4 ms)
      √ should handle axios response with different data ty
pes (1 ms)
      √ should propagate axios errors (83 ms)
      √ should handle axios with status and headers (2 ms)
    readLocal
      √ should read local file content (4 ms)
      √ should propagate file system errors (13 ms)
      √ should handle different file paths (4 ms)
    getFileExtension
      √ should extract extensions from simple file names (5
 ms)
      √ should extract extensions from full file paths
      √ should extract extensions from URLs (1 ms)
      √ should handle URLs with query parameters (2 ms)
      √ should handle URLs with fragments (1 ms)
      √ should handle URLs with query parameters and fragme
nts (9 ms)
      √ should return empty string for files without extens
ions (1 ms)
      √ should handle multiple dots in filename (1 ms)
      √ should handle edge cases (33 ms)
      √ should handle complex extensions (7 ms)
      √ should handle numeric extensions (13 ms)
    integration tests
      √ should work together for URL processing (1 ms)
      √ should work together for file path processing
      √ should handle path building with joinIgnoreNone (1
ms)

 PASS  tests/schemas.test.ts
  schemas
    BuildVariablesDeclarationSchema
      √ should validate valid build variables (25 ms)
      √ should reject non-string values (116 ms)
      √ should handle non-string keys by converting them (6
 ms)
    AuthorDeclarationSchema
      √ should validate author with name only (8 ms)
      √ should validate author with all fields (1 ms)
      √ should require name field (15 ms)
      √ should allow optional email and url (7 ms)
    PageDeclarationSchema
      √ should validate minimal page configuration (17 ms)
      √ should validate full page configuration (12 ms)
      √ should set default extension to .md (21 ms)
      √ should validate inheritFrom as array of numbers (15
 ms)
      √ should reject inheritFrom with non-numbers (3 ms)
      √ should validate keywords as array of strings (4 ms)
      √ should validate tags as array of strings (2 ms)
      √ should validate authors array (1 ms)
    ProjectConfigSchema
      √ should validate minimal project configuration (17 m
s)
      √ should set default values (11 ms)
      √ should validate full project configuration (4 ms)
      √ should require defaults field (10 ms)
      √ should validate nested defaults configuration (1 ms
)
    Type exports
      √ should export ProjectConfig type (1 ms)
      √ should export PageConfig type (1 ms)
    PageDeclarationSchema additional key validation
      √ should allow additional keys that do not conflict w
ith known keys (2 ms)
      √ should validate the refine function logic for addit
ional keys (2 ms)
      √ should reject configurations with conflicting known
 keys (3 ms)
      √ should handle empty config with defaults (1 ms)
    PageDeclarationSchema complex validation
      √ should properly instantiate and use the schema with
 refine function (2 ms)
      √ should execute refine function and reject conflicti
ng additional keys (1 ms)
      √ should handle edge cases in refine function validat
ion (1 ms)

 FAIL  tests/BuildVariablesLoader.test.ts (5.02 s)
  BuildVariablesLoader
    constructor
      √ should create instance with scan root (30 ms)
    fetch
      remote URLs
        √ should fetch from remote URL when isURL returns t
rue (19 ms)
        √ should handle remote fetch errors (151 ms)
      local files
        × should fetch from local file when isURL returns f
alse (9 ms)
        × should handle local file read errors (27 ms)
        × should handle absolute paths correctly (11 ms)
    load
      YAML files
        √ should parse .yaml files (8 ms)
        √ should parse .yml files (2 ms)
        √ should handle YAML parsing errors (30 ms)
      JSON files
        √ should parse .json files (12 ms)
        √ should handle JSON parsing errors (6 ms)
        √ should parse JSON arrays (1 ms)
      INI files
        √ should parse .ini files (4 ms)
        √ should handle INI parsing errors (11 ms)
      unsupported file types
        √ should throw UnsupportedFileTypeError for unsuppo
rted extensions (9 ms)
        √ should throw UnsupportedFileTypeError for files w
ithout extensions (10 ms)
        √ should throw UnsupportedFileTypeError for unknown
 extensions (2 ms)
      fetch errors
        √ should throw FileFetchError when fetch fails (1 m
s)
        √ should preserve original error message in FileFet
chError (3 ms)
      case sensitivity
        √ should handle uppercase extensions (5 ms)
        √ should handle mixed case extensions (4 ms)
    integration scenarios
      √ should load complex YAML with nested structures (2
ms)
      √ should handle empty files gracefully (4 ms)
      √ should handle files with only whitespace (2 ms)
    error message formatting
      √ should include file path in FileFetchError (3 ms)
      √ should include file path in ParseError (2 ms)
      √ should include file path in ParseError for unsuppor
ted file types (2 ms)

  ● BuildVariablesLoader › fetch › local files › should fet
ch from local file when isURL returns false

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/test/root/config/build.yaml"
    Received: "\\test\\root\\config\\build.yaml"

    Number of calls: 1

      71 |
      72 |         expect(mockIsURL).toHaveBeenCalledWith(t
estPath);
    > 73 |         expect(mockReadLocal).toHaveBeenCalledWi
th(expectedFullPath);
         |                               ^
      74 |         expect(mockReadRemote).not.toHaveBeenCal
led();
      75 |         expect(result).toBe(testContent);
      76 |       });

      at Object.<anonymous> (tests/BuildVariablesLoader.tes
t.ts:73:31)

  ● BuildVariablesLoader › fetch › local files › should han
dle local file read errors

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/test/root/config/build.yaml"
    Received: "\\test\\root\\config\\build.yaml"

    Number of calls: 1

      84 |
      85 |         await expect(loader.fetch(testPath)).rej
ects.toThrow('File not found');
    > 86 |         expect(mockReadLocal).toHaveBeenCalledWi
th('/test/root/config/build.yaml');
         |                               ^
      87 |       });
      88 |
      89 |       it('should handle absolute paths correctly
', async () => {

      at Object.<anonymous> (tests/BuildVariablesLoader.tes
t.ts:86:31)

  ● BuildVariablesLoader › fetch › local files › should han
dle absolute paths correctly

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/test/root/absolute/path/config.yaml"
    Received: "\\test\\root\\absolute\\path\\config.yaml"

    Number of calls: 1

       96 |         const result = await loader.fetch(testP
ath);
       97 |
    >  98 |         expect(mockReadLocal).toHaveBeenCalledW
ith('/test/root/absolute/path/config.yaml');
          |                               ^
       99 |         expect(result).toBe(testContent);
      100 |       });
      101 |     });

      at Object.<anonymous> (tests/BuildVariablesLoader.tes
t.ts:98:31)

 PASS  tests/api.schemas.zod.test.ts
  api.schemas Zod Validation
    PageResultSchema validation
      √ should validate a valid page result (10 ms)
      √ should validate minimal page result with required f
ields only (3 ms)
      √ should reject page result missing required baseName
 (60 ms)
      √ should reject page result missing required sourcePa
th (13 ms)
      √ should reject page result missing required success
(2 ms)
      √ should reject page result with wrong types (4 ms)
    BuildResultSchema validation
      √ should validate a valid build result (10 ms)
      √ should validate build result without stats (2 ms)
      √ should reject build result with invalid pages (14 m
s)
      √ should reject build result with wrong types (5 ms)
      √ should reject build result with invalid stats (4 ms
)
    Type inference
      √ should infer correct types from schemas (4 ms)

 PASS  tests/errors.test.ts
  errors
    FileNotFoundError
      √ should create error with correct message and name (
5 ms)
    FileFetchError
      √ should create error with file path and message (1 m
s)
      √ should handle unknown error types (5 ms)
    ParseError
      √ should create error with file path and message (1 m
s)
    JSONParseError
      √ should extend ParseError with JSON-specific message
 (1 ms)
      √ should handle object error messages (4 ms)
    UnsupportedFileTypeError
      √ should create error with file path (1 ms)
    ValidationError
      √ should create error with validation message (3 ms)
    InitializationError
      √ should create error with initialization message
    RenderError
      √ should create error with render message only (1 ms)
      √ should create error with render message and cause
      √ should handle empty cause string (1 ms)
    Error inheritance
      √ should maintain proper prototype chain (69 ms)
      √ should allow error catching by type (3 ms)

 PASS  tests/engines.test.ts (5.267 s)
  Template Engines
    MustacheEngine
      render
        √ should render basic mustache template (39 ms)
        √ should render template with partials (17 ms)
        √ should handle complex templates with arrays (7 ms
)
        √ should throw RenderError for empty rendered outpu
t (82 ms)
        √ should throw RenderError for mustache syntax erro
rs (6 ms)
      registerPartial
        √ should register a partial correctly (6 ms)
        √ should allow overwriting partials (1 ms)
      registerPartialsFromDirectory
        √ should register partials from directory successfu
lly (44 ms)
        √ should handle file read errors gracefully (32 ms)
        √ should use custom extensions (10 ms)
        √ should normalize Windows-style paths to POSIX for
mat for partial keys (16 ms)
        √ should handle deeply nested Windows-style paths (
7 ms)
    HandlebarsEngine
      render
        √ should render basic handlebars template (31 ms)
        √ should render template with helpers (49 ms)
        √ should handle complex nested objects (43 ms)
        √ should throw RenderError for empty rendered outpu
t (16 ms)
        √ should throw RenderError for handlebars syntax er
rors (15 ms)
      registerPartial
        √ should register and use handlebars partials (27 m
s)
        √ should handle partials with context (25 ms)
      registerPartialsFromDirectory
        √ should register handlebars partials from director
y (29 ms)

 PASS  tests/api.schemas.types.test.ts
  API Schemas
    Type Exports
      √ should provide PageResult type correctly (4 ms)
      √ should provide BuildResult type correctly (2 ms)
      √ should handle optional fields in PageResult (3 ms)
      √ should handle optional stats in BuildResult (1 ms)

 PASS  tests/MetadataGenerator.test.ts (5.317 s)
  MetadataGenerator
    isEnabled
      √ should return false when metadata is disabled (90 m
s)
      √ should return true when metadata is enabled (20 ms)
      √ should return false when metadata config is undefin
ed (22 ms)
    shouldWriteMetadataFile
      √ should return false when metadata is disabled (4 ms
)
      √ should return true when enabled with kind=file (4 m
s)
      √ should return true when enabled without kind (defau
lts to file) (9 ms)
      √ should return false when kind=prepend (7 ms)
    shouldPrependMetadata
      √ should return false when metadata is disabled (13 m
s)
      √ should return false when kind=file (14 ms)
      √ should return true when kind=prepend (10 ms)
    generateMetadataFile
      √ should generate JSON string with proper formatting
(6 ms)
      √ should include all metadata fields (3 ms)
    createMetadata
      √ should create metadata object with all required fie
lds (6 ms)
      √ should spread all pageConfig properties into metada
ta (6 ms)
    prependMetadata
      √ should return content unchanged when kind is not pr
epend (1 ms)
      √ should prepend YAML metadata with default separator
 (12 ms)
      √ should prepend JSON metadata when format is json (2
 ms)
      √ should use custom separator (4 ms)
      √ should use custom method when provided (1 ms)
      √ should handle complex metadata objects in YAML form
at (19 ms)
      √ should handle complex metadata objects in JSON form
at (8 ms)
    metadata transform
      √ should apply transform function when configured (2
ms)
      √ should not modify metadata when no transform is con
figured (1 ms)
    generateMetadataOutputPath
      √ should generate correct metadata path for .html fil
e (1 ms)
      √ should generate correct metadata path for .md file
(2 ms)
      √ should handle nested paths (1 ms)
      √ should handle files with multiple dots (2 ms)
    writeMetadataFile
      √ should write metadata to file (4 ms)
      √ should create directories if they don't exist (3 ms
)
    METADATA_SUFFIX constant
      √ should have correct suffix value

 PASS  tests/schemas.refine.test.ts
  PageDeclarationSchema refine function coverage
    √ should trigger the refine function for additional key
 validation (13 ms)
    √ should execute the refine function validation logic (
3 ms)
    √ should handle edge cases in the refine function (3 ms
)
    √ should validate the complete schema structure with re
fine (3 ms)
    √ should exercise the refine function with various key
combinations (3 ms)
    √ should execute the refine function for function cover
age (7 ms)

 PASS  tests/integration.test.ts (5.673 s)
  TemplateRenderer Integration Tests
    Basic Configuration and Setup
      √ should create renderer with example.js configuratio
n (29 ms)
      √ should handle build errors gracefully as shown in e
xample.js (5 ms)
    Single File Building (buildSingle)
      √ should build single YAML file as in example.js (6 m
s)
      √ should handle buildSingle errors gracefully (6 ms)
    Configuration-based Building (buildFromConfiguration)
      √ should build multi-language pages from direct confi
guration (3 ms)
      √ should handle buildFromConfiguration errors gracefu
lly (3 ms)
    Counter Pages Loop (like example.js)
      √ should build multiple counter pages in sequence (4
ms)
    Error Handling with Invalid Configuration
      √ should handle invalid inheritFrom indices gracefull
y (2 ms)
    Template Rendering
      √ should render mustache templates correctly (6 ms)
      √ should handle rendering errors (59 ms)
      √ should handle empty rendered output (6 ms)
    Full Build Integration
      √ should perform complete build workflow like example
.js (4 ms)
      √ should handle mixed success and failure scenarios (
2 ms)
    Error Recovery and Resilience
      √ should continue processing even when individual fil
es fail (3 ms)

  console.error
    Error processing item with base name invalid: Error: In
valid inheritFrom index 5 in item at index 1
        at PageParser._applyCascadeInheritance (C:\Users\Om
ar\Helio\packages\template\src\PageParser.ts:290:17)
        at PageParser.processPageConfigurations (C:\Users\O
mar\Helio\packages\template\src\PageParser.ts:151:31)
        at processTicksAndRejections (node:internal/process
/task_queues:104:5)
        at Object.<anonymous> (C:\Users\Omar\Helio\packages
\template\tests\PageParser.test.ts:258:23)

      220 |         }
      221 |       } catch (err: unknown) {
    > 222 |         console.error(`Error processing item wi
th base name ${relativeBaseName}:`, err);
          |                 ^
      223 |         results.push({
      224 |           baseName: relativeBaseName,
      225 |           sourcePath: relativeBaseName,

      at PageParser.processPageConfigurations (src/PagePars
er.ts:222:17)
      at Object.<anonymous> (tests/PageParser.test.ts:258:2
3)

  console.error
    Error processing item with base name non-cascade: Error
: Invalid inheritFrom index 2 must be less than or equal to
 the current item index 1 to apply inheritance correctly
        at PageParser._applyCascadeInheritance (C:\Users\Om
ar\Helio\packages\template\src\PageParser.ts:294:17)
        at PageParser.processPageConfigurations (C:\Users\O
mar\Helio\packages\template\src\PageParser.ts:151:31)
        at processTicksAndRejections (node:internal/process
/task_queues:104:5)
        at Object.<anonymous> (C:\Users\Omar\Helio\packages
\template\tests\PageParser.test.ts:272:23)

      220 |         }
      221 |       } catch (err: unknown) {
    > 222 |         console.error(`Error processing item wi
th base name ${relativeBaseName}:`, err);
          |                 ^
      223 |         results.push({
      224 |           baseName: relativeBaseName,
      225 |           sourcePath: relativeBaseName,

      at PageParser.processPageConfigurations (src/PagePars
er.ts:222:17)
      at Object.<anonymous> (tests/PageParser.test.ts:272:2
3)

  console.error
    Error processing item with base name error: Error: Rend
ering failed
        at Object.<anonymous> (C:\Users\Omar\Helio\packages
\template\tests\PageParser.test.ts:356:15)
        at C:\Users\Omar\Helio\node_modules\jest-mock\build
\index.js:397:39
        at Object.<anonymous> (C:\Users\Omar\Helio\node_mod
ules\jest-mock\build\index.js:404:13)
        at Object.mockConstructor [as render] (C:\Users\Oma
r\Helio\node_modules\jest-mock\build\index.js:148:19)
        at PageParser.generateOutputContent (C:\Users\Omar\
Helio\packages\template\src\PageParser.ts:263:24)
        at PageParser.generateOutputContentFromFile (C:\Use
rs\Omar\Helio\packages\template\src\PageParser.ts:249:17)
        at processTicksAndRejections (node:internal/process
/task_queues:104:5)
        at PageParser.processPageConfigurations (C:\Users\O
mar\Helio\packages\template\src\PageParser.ts:183:29)
        at Object.<anonymous> (C:\Users\Omar\Helio\packages
\template\tests\PageParser.test.ts:360:23)

      220 |         }
      221 |       } catch (err: unknown) {
    > 222 |         console.error(`Error processing item wi
th base name ${relativeBaseName}:`, err);
          |                 ^
      223 |         results.push({
      224 |           baseName: relativeBaseName,
      225 |           sourcePath: relativeBaseName,

      at PageParser.processPageConfigurations (src/PagePars
er.ts:222:17)
      at Object.<anonymous> (tests/PageParser.test.ts:360:2
3)

  console.error
    Error processing item with base name write-error: Error
: Write failed
        at Object.<anonymous> (C:\Users\Omar\Helio\packages
\template\tests\PageParser.test.ts:367:42)
        at Promise.then.completed (C:\Users\Omar\Helio\node
_modules\jest-circus\build\utils.js:298:28)
        at new Promise (<anonymous>)
        at callAsyncCircusFn (C:\Users\Omar\Helio\node_modu
les\jest-circus\build\utils.js:231:10)
        at _callCircusTest (C:\Users\Omar\Helio\node_module
s\jest-circus\build\run.js:316:40)
        at processTicksAndRejections (node:internal/process
/task_queues:104:5)
        at _runTest (C:\Users\Omar\Helio\node_modules\jest-
circus\build\run.js:252:3)
        at _runTestsForDescribeBlock (C:\Users\Omar\Helio\n
ode_modules\jest-circus\build\run.js:126:9)
        at _runTestsForDescribeBlock (C:\Users\Omar\Helio\n
ode_modules\jest-circus\build\run.js:121:9)
        at _runTestsForDescribeBlock (C:\Users\Omar\Helio\n
ode_modules\jest-circus\build\run.js:121:9)
        at run (C:\Users\Omar\Helio\node_modules\jest-circu
s\build\run.js:71:3)
        at runAndTransformResultsToJestFormat (C:\Users\Oma
r\Helio\node_modules\jest-circus\build\legacy-code-todo-rew
rite\jestAdapterInit.js:122:21)
        at jestAdapter (C:\Users\Omar\Helio\node_modules\je
st-circus\build\legacy-code-todo-rewrite\jestAdapter.js:79:
19)
        at runTestInternal (C:\Users\Omar\Helio\node_module
s\jest-runner\build\runTest.js:367:16)
        at runTest (C:\Users\Omar\Helio\node_modules\jest-r
unner\build\runTest.js:444:34)
        at Object.worker (C:\Users\Omar\Helio\node_modules\
jest-runner\build\testWorker.js:106:12)

      220 |         }
      221 |       } catch (err: unknown) {
    > 222 |         console.error(`Error processing item wi
th base name ${relativeBaseName}:`, err);
          |                 ^
      223 |         results.push({
      224 |           baseName: relativeBaseName,
      225 |           sourcePath: relativeBaseName,

      at PageParser.processPageConfigurations (src/PagePars
er.ts:222:17)
      at Object.<anonymous> (tests/PageParser.test.ts:370:2
3)

  console.warn
    Error processing C:\current\dir\test-source\test2.yml:
File processing error

      145 |       return pages;
      146 |     } catch (error: unknown) {
    > 147 |       console.warn(`Error processing ${yamlPath
}: ${(error as Error).message}`);
          |               ^
      148 |       return [];
      149 |     }
      150 |   }

      at Renderer.buildSingle (src/Renderer.ts:147:15)
      at Renderer.build (src/Renderer.ts:80:31)
      at Object.<anonymous> (tests/Renderer.test.ts:284:22)

  console.warn
    Error processing C:\current\dir\test-source\test.yaml:
Renderer destroyed

      145 |       return pages;
      146 |     } catch (error: unknown) {
    > 147 |       console.warn(`Error processing ${yamlPath
}: ${(error as Error).message}`);
          |               ^
      148 |       return [];
      149 |     }
      150 |   }

      at Renderer.buildSingle (src/Renderer.ts:147:15)
      at Renderer.build (src/Renderer.ts:80:31)
      at Object.<anonymous> (tests/Renderer.test.ts:917:22)

 FAIL  tests/PageParser.test.ts (6.399 s)
  PageParser
    constructor
      √ should create PageParser with renderer and config (
14 ms)
      √ should set METADATA_SUFFIX constant (2 ms)
    processYamlFile
      × should process YAML file successfully (29 ms)
      √ should handle file read error (14 ms)
      √ should handle YAML parse error (6 ms)
      × should calculate relative base name correctly (7 ms
)
      × should handle .yml extension (4 ms)
      √ should handle empty YAML documents (1 ms)
    processConfigurations
      √ should process configurations without file content
(6 ms)
      √ should process configurations with file content (4
ms)
      √ should handle null and undefined configurations (3
ms)
    processPageConfigurations (private method)
      √ should apply default configuration (2 ms)
      √ should apply inheritance correctly (1 ms)
      √ should handle invalid inheritance indices (154 ms)
      √ should handle non-cascade inheritance (42 ms)
      √ should load build variables (8 ms)
      × should generate correct source file names for defau
lt language (5 ms)
      × should generate correct source file names for non-d
efault language (6 ms)
      × should generate correct output paths for default la
nguage (4 ms)
      × should generate correct output paths for non-defaul
t language (4 ms)
      √ should skip output generation when output is false
(3 ms)
      × should create output directories (3 ms)
      √ should handle rendering errors gracefully (32 ms)
      √ should handle file write errors gracefully (11 ms)
      × should handle different file extensions (4 ms)
      × should generate metadata JSON files (5 ms)
      × should set correct metadata path in results (2 ms)
    generateOutputContentFromFile (private method)
      × should read source file and generate output content
 (1 ms)
      √ should handle file read errors (1 ms)
    generateOutputContent (private method)
      √ should generate output from provided content (1 ms)
      √ should handle rendering errors (1 ms)
    helper methods
      _applyCascadeInheritance
        √ should apply inheritance correctly (2 ms)
        √ should throw error for invalid current index (4 m
s)
        √ should throw error for invalid inheritFrom index
(2 ms)
        √ should handle multiple inheritance sources (2 ms)
        √ should handle configs without inheritFrom
      _prepareBuildVariables
        √ should prepare build variables without external v
ariables (2 ms)
        √ should load external build variables (4 ms)
      _getPageLanguage
        √ should return config language when specified (1 m
s)
        √ should return default language when not specified
      _getSourceFileName
        √ should generate filename for default language (4
ms)
        √ should generate filename for non-default language
 (3 ms)
        √ should handle extension with dot
        √ should handle nested paths (1 ms)
      _generateOutputPath
        × should generate paths for default language (3 ms)
        × should generate paths for non-default language (2
 ms)
        × should handle different extensions (1 ms)
        × should use project config output root (2 ms)
    loadYaml (private method)
      √ should load and parse YAML file (1 ms)
      √ should handle file read errors (2 ms)
      √ should handle YAML parse errors (1 ms)
      √ should handle documents that return null from toJSO
N (2 ms)
      √ should handle empty document array
    path helper methods
      √ should get project root from renderer
      √ should get scan root from renderer
    edge cases and error handling
      √ should handle empty configurations array (1 ms)
      √ should handle configuration with no title (1 ms)
      × should handle long file paths (3 ms)
      × should handle special characters in file names (3 m
s)
      √ should handle very large number of configurations (
30 ms)
      √ should handle partial loading errors gracefully (4
ms)
    edge cases and branch coverage
      √ should handle configuration with empty extension pr
operty (1 ms)
      √ should handle configurations with undefined extensi
on
      √ should handle languages correctly for extension def
aulting (1 ms)
    metadata generation with different configurations
      √ should write metadata file when kind=file (1 ms)
      √ should not write metadata file when disabled
      √ should prepend YAML metadata when kind=prepend (1 m
s)
      √ should prepend JSON metadata when kind=prepend and
format=json (1 ms)
      √ should use custom separator when provided (2 ms)
      √ should not include metadataPath in results when met
adata is disabled (1 ms)
      √ should include metadataPath in results when kind=fi
le (1 ms)

  ● PageParser › processYamlFile › should process YAML file
 successfully

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/test.md"
    Received: "\\project\\src\\test.md"

      130 |       expect(results).toHaveLength(1);
      131 |       expect(results[0].success).toBe(true);
    > 132 |       expect(results[0].sourcePath).toBe("/proj
ect/src/test.md");
          |                                     ^
      133 |     });
      134 |
      135 |     it("should handle file read error", async (
) => {

      at Object.<anonymous> (tests/PageParser.test.ts:132:3
7)

  ● PageParser › processYamlFile › should calculate relativ
e base name correctly

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/docs/guide.md"
    Received: "\\project\\src\\docs\\guide.md"

      159 |
      160 |       const results = await pageParser.processY
amlFile(yamlPath);
    > 161 |       expect(results[0].sourcePath).toBe("/proj
ect/src/docs/guide.md");
          |                                     ^
      162 |     });
      163 |
      164 |     it("should handle .yml extension", async ()
 => {

      at Object.<anonymous> (tests/PageParser.test.ts:161:3
7)

  ● PageParser › processYamlFile › should handle .yml exten
sion

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/test.md"
    Received: "\\project\\src\\test.md"

      168 |
      169 |       const results = await pageParser.processY
amlFile(yamlPath);
    > 170 |       expect(results[0].sourcePath).toBe("/proj
ect/src/test.md");
          |                                     ^
      171 |     });
      172 |
      173 |     it("should handle empty YAML documents", as
ync () => {

      at Object.<anonymous> (tests/PageParser.test.ts:170:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should generate correct source file names for default la
nguage

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/test.md"
    Received: "\\project\\src\\test.md"

      306 |       const results = await pageParser["process
PageConfigurations"](configs, "test");
      307 |
    > 308 |       expect(results[0].sourcePath).toBe("/proj
ect/src/test.md"); // No language suffix for default
          |                                     ^
      309 |     });
      310 |
      311 |     it("should generate correct source file nam
es for non-default language", async () => {

      at Object.<anonymous> (tests/PageParser.test.ts:308:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should generate correct source file names for non-defaul
t language

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/test.es.md"
    Received: "\\project\\src\\test.es.md"

      314 |       const results = await pageParser["process
PageConfigurations"](configs, "test");
      315 |
    > 316 |       expect(results[0].sourcePath).toBe("/proj
ect/src/test.es.md"); // Language suffix for non-default
          |                                     ^
      317 |     });
      318 |
      319 |     it("should generate correct output paths fo
r default language", async () => {

      at Object.<anonymous> (tests/PageParser.test.ts:316:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should generate correct output paths for default languag
e

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/test.md"
    Received: "\\project\\dist\\test.md"

      322 |       const results = await pageParser["process
PageConfigurations"](configs, "test");
      323 |
    > 324 |       expect(results[0].outputPath).toBe("/proj
ect/dist/test.md");
          |                                     ^
      325 |     });
      326 |
      327 |     it("should generate correct output paths fo
r non-default language", async () => {

      at Object.<anonymous> (tests/PageParser.test.ts:324:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should generate correct output paths for non-default lan
guage

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/es/test.md"
    Received: "\\project\\dist\\es\\test.md"

      330 |       const results = await pageParser["process
PageConfigurations"](configs, "test");
      331 |
    > 332 |       expect(results[0].outputPath).toBe("/proj
ect/dist/es/test.md");
          |                                     ^
      333 |     });
      334 |
      335 |     it("should skip output generation when outp
ut is false", async () => {

      at Object.<anonymous> (tests/PageParser.test.ts:332:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should create output directories

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/project/dist", {"recursive": true}
    Received
           1
              "\\project\\dist",
              {"recursive": true},
           2
              "\\project\\dist",
              {"recursive": true},

    Number of calls: 2

      347 |       await pageParser["processPageConfiguratio
ns"](configs, "test");
      348 |
    > 349 |       expect(mockFs.mkdir).toHaveBeenCalledWith
("/project/dist", {
          |                            ^
      350 |         recursive: true,
      351 |       });
      352 |     });

      at Object.<anonymous> (tests/PageParser.test.ts:349:2
8)

  ● PageParser › processPageConfigurations (private method)
 › should handle different file extensions

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/extensions.md"
    Received: "\\project\\src\\extensions.md"

      383 |       const results = await pageParser["process
PageConfigurations"](configs, "extensions");
      384 |
    > 385 |       expect(results[0].sourcePath).toBe("/proj
ect/src/extensions.md");
          |                                     ^
      386 |       expect(results[1].sourcePath).toBe("/proj
ect/src/extensions.html");
      387 |       expect(results[2].sourcePath).toBe("/proj
ect/src/extensions.txt");
      388 |     });

      at Object.<anonymous> (tests/PageParser.test.ts:385:3
7)

  ● PageParser › processPageConfigurations (private method)
 › should generate metadata JSON files

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/project/dist/metadata.metadata.json", Strin
gContaining "\"title\": \"Test\"", "utf-8"
    Received
           1: "\\project\\dist\\metadata.md", "Rendered con
tent", "utf-8"
           2: "\\project\\dist\\metadata.metadata.json", "{
      \"source\": \"src\\\\metadata.md\",
      \"metadataOutputPath\": \"dist\\\\metadata.metadata.j
son\",
      \"projectConfig\": {
        \"version\": \"1.0.0\",
        \"projectRoot\": \".\",
        \"scanRoot\": \"./src\",
        \"outputRoot\": \"./dist\",
        \"defaults\": {
          \"language\": \"en\",
          \"extension\": \"md\",
          \"output\": true,
          \"title\": \"Default Title\",
          \"description\": \"Default Description\"
        },
        \"partials\": {
          \"directoryPaths\": [
            \".\"
          ],
          \"extensions\": [
            \"mustache\",
            \"md\"
          ]
        }
      },
      \"language\": \"en\",
      \"extension\": \"md\",
      \"output\": true,
      \"title\": \"Test\",
      \"description\": \"Default Description\"
    }", "utf-8"

    Number of calls: 2

      393 |       await pageParser["processPageConfiguratio
ns"](configs, "metadata");
      394 |
    > 395 |       expect(mockFs.writeFile).toHaveBeenCalled
With(
          |                                ^
      396 |         "/project/dist/metadata.metadata.json",
      397 |         expect.stringContaining('"title": "Test
"'),
      398 |         "utf-8",

      at Object.<anonymous> (tests/PageParser.test.ts:395:3
2)

  ● PageParser › processPageConfigurations (private method)
 › should set correct metadata path in results

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/metadata.metadata.json"
    Received: "\\project\\dist\\metadata.metadata.json"

      405 |       const results = await pageParser["process
PageConfigurations"](configs, "metadata");
      406 |
    > 407 |       expect(results[0].metadataPath).toBe("/pr
oject/dist/metadata.metadata.json");
          |                                       ^
      408 |     });
      409 |   });
      410 |

      at Object.<anonymous> (tests/PageParser.test.ts:407:3
9)

  ● PageParser › generateOutputContentFromFile (private met
hod) › should read source file and generate output content

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/project/src/test.md", "utf-8"
    Received: "\\project\\src\\test.md", "utf-8"

    Number of calls: 1

      419 |       });
      420 |
    > 421 |       expect(mockFs.readFile).toHaveBeenCalledW
ith("/project/src/test.md", "utf-8");
          |                               ^
      422 |       expect(mockEngine.render).toHaveBeenCalle
dWith(sourceContent, {
      423 |         title: "Test",
      424 |         description: "Description",

      at Object.<anonymous> (tests/PageParser.test.ts:421:3
1)

  ● PageParser › helper methods › _generateOutputPath › sho
uld generate paths for default language

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/test.md"
    Received: "\\project\\dist\\test.md"

      597 |         const result = pageParser["_generateOut
putPath"]("test", "md");
      598 |
    > 599 |         expect(result).toBe("/project/dist/test
.md");
          |                        ^
      600 |       });
      601 |
      602 |       it("should generate paths for non-default
 language", () => {

      at Object.<anonymous> (tests/PageParser.test.ts:599:2
4)

  ● PageParser › helper methods › _generateOutputPath › sho
uld generate paths for non-default language

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/es/test.md"
    Received: "\\project\\dist\\es\\test.md"

      609 |         const result = pageParser["_generateOut
putPath"](relName, "md");
      610 |
    > 611 |         expect(result).toBe("/project/dist/es/t
est.md");
          |                        ^
      612 |       });
      613 |
      614 |       it("should handle different extensions",
() => {

      at Object.<anonymous> (tests/PageParser.test.ts:611:2
4)

  ● PageParser › helper methods › _generateOutputPath › sho
uld handle different extensions

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/dist/test.html"
    Received: "\\project\\dist\\test.html"

      615 |         const result = pageParser["_generateOut
putPath"]("test", "html");
      616 |
    > 617 |         expect(result).toBe("/project/dist/test
.html");
          |                        ^
      618 |       });
      619 |
      620 |       it("should use project config output root
", () => {

      at Object.<anonymous> (tests/PageParser.test.ts:617:2
4)

  ● PageParser › helper methods › _generateOutputPath › sho
uld use project config output root

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/build/test.md"
    Received: "\\project\\build\\test.md"

      622 |         const result = pageParser["_generateOut
putPath"]("test", "md");
      623 |
    > 624 |         expect(result).toBe("/project/build/tes
t.md");
          |                        ^
      625 |       });
      626 |     });
      627 |   });

      at Object.<anonymous> (tests/PageParser.test.ts:624:2
4)

  ● PageParser › edge cases and error handling › should han
dle long file paths

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/very/deeply/nested/directory/st
ructure/with/many/levels/document.md"
    Received: "\\project\\src\\very\\deeply\\nested\\direct
ory\\structure\\with\\many\\levels\\document.md"

      713 |       const results = await pageParser["process
PageConfigurations"](configs, longPath);
      714 |
    > 715 |       expect(results[0].sourcePath).toBe(`/proj
ect/src/${longPath}.md`);
          |                                     ^
      716 |       expect(results[0].outputPath).toBe(`/proj
ect/dist/${longPath}.md`);
      717 |     });
      718 |

      at Object.<anonymous> (tests/PageParser.test.ts:715:3
7)

  ● PageParser › edge cases and error handling › should han
dle special characters in file names

    expect(received).toBe(expected) // Object.is equality

    Expected: "/project/src/docs/特殊文档-español_français.
测试.md"
    Received: "\\project\\src\\docs\\特殊文档-español_franç
ais.测试.md"

      723 |       const results = await pageParser["process
PageConfigurations"](configs, specialPath);
      724 |
    > 725 |       expect(results[0].sourcePath).toBe(`/proj
ect/src/${specialPath}.md`);
          |                                     ^
      726 |     });
      727 |
      728 |     it("should handle very large number of conf
igurations", async () => {

      at Object.<anonymous> (tests/PageParser.test.ts:725:3
7)

 FAIL  tests/Renderer.test.ts (6.571 s)
  Renderer
    constructor
      × should create renderer with valid config (20 ms)
      × should use default paths when not specified (17 ms)
      √ should use default language when not specified (7 m
s)
      √ should create renderer with handlebars engine (7 ms
)
      √ should create renderer with mustache engine explici
tly (3 ms)
      √ should use default mustache engine for unknown engi
ne types (9 ms)
      √ should throw InitializationError for invalid config
 (18 ms)
      × should resolve absolute paths correctly (6 ms)
    build method
      √ should build all YAML files successfully (4 ms)
      √ should handle individual file build failures (5 ms)
      √ should handle YAML file processing exceptions (158
ms)
      √ should handle complete build failure (6 ms)
      √ should handle empty directory (5 ms)
      √ should handle nested directories (4 ms)
      √ should calculate build statistics correctly (35 ms)
    buildSingle method
      × should build single YAML file successfully (3 ms)
      × should handle relative paths (3 ms)
      × should handle absolute paths (3 ms)
      √ should handle processing errors gracefully (2 ms)
      √ should handle FileFetchError (4 ms)
      √ should handle ParseError (2 ms)
    buildFromConfiguration method
      √ should build from configuration objects (3 ms)
      √ should build from configuration without content (1
ms)
      √ should handle configuration processing errors (1 ms
)
      √ should handle empty configurations array (2 ms)
      √ should handle RenderError from PageParser (4 ms)
    render method
      √ should render simple mustache template (2 ms)
      √ should render complex mustache template (3 ms)
      √ should handle empty variables (1 ms)
      √ should handle missing variables gracefully (2 ms)
      √ should throw RenderError for empty rendered output
(4 ms)
      √ should handle mustache rendering errors (5 ms)
      √ should handle nested object variables (1 ms)
      √ should handle array iteration (2 ms)
      √ should handle boolean conditionals (3 ms)
      √ should render handlebars templates when engine is h
andlebars (2 ms)
    findYamlFiles (private method)
      √ should find YAML files recursively (4 ms)
      √ should handle empty directories (2 ms)
      √ should ignore non-YAML files (2 ms)
      √ should handle deeply nested directories (1 ms)
    integration tests
      √ should handle complete workflow with real data (3 m
s)
      √ should handle mixed success and failure scenarios (
2 ms)
      √ should handle large scale builds (11 ms)
    error handling edge cases
      √ should handle renderer destruction during build (24
 ms)
      √ should handle concurrent build operations (3 ms)
      √ should handle build errors in the try-catch block (
2 ms)
    helper methods
      getOutputFilePath
        × should generate correct output file path (4 ms)
        × should handle extension with leading dot (3 ms)
        × should handle nested paths (6 ms)
        × should handle special characters in base name (3
ms)
      getMetadataFilePath
        × should generate correct metadata file path (3 ms)
        × should handle nested paths (5 ms)
        × should handle special characters in base name (4
ms)
        √ should use PageParser METADATA_SUFFIX constant (2
 ms)
      getSourceFilePath
        × should generate correct source file path (3 ms)
        × should handle extension with leading dot when gen
erating source path (2 ms)
        × should handle extension without leading dot when
generating source path (4 ms)
        √ should generate correct source file path (2 ms)
        √ should handle extension with leading dot when gen
erating source path (1 ms)
        √ should handle extension without leading dot when
generating source path (1 ms)
    engine configuration edge cases
      √ should handle handlebars engine explicitly (3 ms)
      √ should handle mustache engine explicitly (1 ms)

  ● Renderer › constructor › should create renderer with va
lid config

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-project"
    Received: "C:\\current\\dir\\test-project"

      86 |     it("should create renderer with valid config
", () => {
      87 |       expect(renderer).toBeInstanceOf(Renderer);
    > 88 |       expect(renderer.paths.projectRoot).toBe("/
current/dir/test-project");
         |                                          ^
      89 |       expect(renderer.paths.scanRoot).toBe("/cur
rent/dir/test-source");
      90 |       expect(renderer.paths.outputRoot).toBe("/c
urrent/dir/test-output");
      91 |       expect(renderer.defaultLanguage).toBe("en"
);

      at Object.<anonymous> (tests/Renderer.test.ts:88:42)

  ● Renderer › constructor › should use default paths when
not specified

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir"
    Received: "C:\\current\\dir"

      101 |       const minimalRenderer = new Renderer(mini
malConfig as ProjectConfig);
      102 |
    > 103 |       expect(minimalRenderer.paths.projectRoot)
.toBe("/current/dir");
          |
 ^
      104 |       expect(minimalRenderer.paths.scanRoot).to
Be("/current/dir");
      105 |       expect(minimalRenderer.paths.outputRoot).
toBe("/current/dir/dist");
      106 |     });

      at Object.<anonymous> (tests/Renderer.test.ts:103:49)

  ● Renderer › constructor › should resolve absolute paths
correctly

    expect(received).toBe(expected) // Object.is equality

    Expected: "/absolute/project"
    Received: "C:\\absolute\\project"

      184 |       const absoluteRenderer = new Renderer(abs
oluteConfig as ProjectConfig);
      185 |
    > 186 |       expect(absoluteRenderer.paths.projectRoot
).toBe("/absolute/project");
          |
  ^
      187 |       expect(absoluteRenderer.paths.scanRoot).t
oBe("/absolute/source");
      188 |       expect(absoluteRenderer.paths.outputRoot)
.toBe("/absolute/output");
      189 |     });

      at Object.<anonymous> (tests/Renderer.test.ts:186:50)

  ● Renderer › buildSingle method › should build single YAM
L file successfully

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/current/dir/test-source/test.yaml", undefin
ed
    Received: "C:\\current\\dir\\test-source\\test.yaml", u
ndefined

    Number of calls: 1

      385 |       const results = await renderer.buildSingl
e("test.yaml");
      386 |
    > 387 |       expect(mockPageParser.processYamlFile).to
HaveBeenCalledWith(
          |                                              ^
      388 |         "/current/dir/test-source/test.yaml",
      389 |         undefined,
      390 |       );

      at Object.<anonymous> (tests/Renderer.test.ts:387:46)

  ● Renderer › buildSingle method › should handle relative
paths

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/current/dir/test-source/docs/guide.yaml", u
ndefined
    Received: "C:\\current\\dir\\test-source\\docs\\guide.y
aml", undefined

    Number of calls: 1

      400 |       const results = await renderer.buildSingl
e("docs/guide.yaml");
      401 |
    > 402 |       expect(mockPageParser.processYamlFile).to
HaveBeenCalledWith(
          |                                              ^
      403 |         "/current/dir/test-source/docs/guide.ya
ml",
      404 |         undefined,
      405 |       );

      at Object.<anonymous> (tests/Renderer.test.ts:402:46)

  ● Renderer › buildSingle method › should handle absolute
paths

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "/absolute/path/test.yaml", undefined
    Received: "C:\\absolute\\path\\test.yaml", undefined

    Number of calls: 1

      416 |       const results = await renderer.buildSingl
e(absolutePath);
      417 |
    > 418 |       expect(mockPageParser.processYamlFile).to
HaveBeenCalledWith(absolutePath, undefined);
          |                                              ^
      419 |       expect(results).toEqual(mockResults);
      420 |     });
      421 |

      at Object.<anonymous> (tests/Renderer.test.ts:418:46)

  ● Renderer › helper methods › getOutputFilePath › should
generate correct output file path

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/test/page.html"
    Received: "C:\\current\\dir\\test-output\\test\\page.ht
ml"

      964 |       it("should generate correct output file p
ath", () => {
      965 |         const result = renderer.getOutputFilePa
th("test/page", "html");
    > 966 |         expect(result).toBe("/current/dir/test-
output/test/page.html");
          |                        ^
      967 |       });
      968 |
      969 |       it("should handle extension with leading
dot", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:966:24)

  ● Renderer › helper methods › getOutputFilePath › should
handle extension with leading dot

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/test/page.html"
    Received: "C:\\current\\dir\\test-output\\test\\page.ht
ml"

      969 |       it("should handle extension with leading
dot", () => {
      970 |         const result = renderer.getOutputFilePa
th("test/page", ".html");
    > 971 |         expect(result).toBe("/current/dir/test-
output/test/page.html");
          |                        ^
      972 |       });
      973 |
      974 |       it("should handle nested paths", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:971:24)

  ● Renderer › helper methods › getOutputFilePath › should
handle nested paths

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/docs/guides/getting
-started.md"
    Received: "C:\\current\\dir\\test-output\\docs\\guides\
\getting-started.md"

      974 |       it("should handle nested paths", () => {
      975 |         const result = renderer.getOutputFilePa
th("docs/guides/getting-started", "md");
    > 976 |         expect(result).toBe("/current/dir/test-
output/docs/guides/getting-started.md");
          |                        ^
      977 |       });
      978 |
      979 |       it("should handle special characters in b
ase name", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:976:24)

  ● Renderer › helper methods › getOutputFilePath › should
handle special characters in base name

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/test-file_name.txt"
    Received: "C:\\current\\dir\\test-output\\test-file_nam
e.txt"

      979 |       it("should handle special characters in b
ase name", () => {
      980 |         const result = renderer.getOutputFilePa
th("test-file_name", "txt");
    > 981 |         expect(result).toBe("/current/dir/test-
output/test-file_name.txt");
          |                        ^
      982 |       });
      983 |     });
      984 |

      at Object.<anonymous> (tests/Renderer.test.ts:981:24)

  ● Renderer › helper methods › getMetadataFilePath › shoul
d generate correct metadata file path

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/test/page.metadata.
json"
    Received: "C:\\current\\dir\\test-output\\test\\page.me
tadata.json"

      986 |       it("should generate correct metadata file
 path", () => {
      987 |         const result = renderer.getMetadataFile
Path("test/page");
    > 988 |         expect(result).toBe("/current/dir/test-
output/test/page.metadata.json");
          |                        ^
      989 |       });
      990 |
      991 |       it("should handle nested paths", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:988:24)

  ● Renderer › helper methods › getMetadataFilePath › shoul
d handle nested paths

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/docs/guides/getting
-started.metadata.json"
    Received: "C:\\current\\dir\\test-output\\docs\\guides\
\getting-started.metadata.json"

      991 |       it("should handle nested paths", () => {
      992 |         const result = renderer.getMetadataFile
Path("docs/guides/getting-started");
    > 993 |         expect(result).toBe("/current/dir/test-
output/docs/guides/getting-started.metadata.json");
          |                        ^
      994 |       });
      995 |
      996 |       it("should handle special characters in b
ase name", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:993:24)

  ● Renderer › helper methods › getMetadataFilePath › shoul
d handle special characters in base name

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-output/test-file_name.meta
data.json"
    Received: "C:\\current\\dir\\test-output\\test-file_nam
e.metadata.json"

       996 |       it("should handle special characters in
base name", () => {
       997 |         const result = renderer.getMetadataFil
ePath("test-file_name");
    >  998 |         expect(result).toBe("/current/dir/test
-output/test-file_name.metadata.json");
           |                        ^
       999 |       });
      1000 |
      1001 |       it("should use PageParser METADATA_SUFFI
X constant", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:998:24)

  ● Renderer › helper methods › getSourceFilePath › should
generate correct source file path

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-source/test/page.html"
    Received: "C:\\current\\dir\\test-source\\test\\page.ht
ml"

      1009 |       it("should generate correct source file
path", () => {
      1010 |         const result = renderer.getSourceFileP
ath("test/page", "html");
    > 1011 |         expect(result).toBe("/current/dir/test
-source/test/page.html");
           |                        ^
      1012 |       });
      1013 |
      1014 |       it("should handle extension with leading
 dot when generating source path", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:1011:24
)

  ● Renderer › helper methods › getSourceFilePath › should
handle extension with leading dot when generating source pa
th

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-source/test/page.html"
    Received: "C:\\current\\dir\\test-source\\test\\page.ht
ml"

      1014 |       it("should handle extension with leading
 dot when generating source path", () => {
      1015 |         const result = renderer.getSourceFileP
ath("test/page", ".html");
    > 1016 |         expect(result).toBe("/current/dir/test
-source/test/page.html");
           |                        ^
      1017 |       });
      1018 |
      1019 |       it("should handle extension without lead
ing dot when generating source path", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:1016:24
)

  ● Renderer › helper methods › getSourceFilePath › should
handle extension without leading dot when generating source
 path

    expect(received).toBe(expected) // Object.is equality

    Expected: "/current/dir/test-source/test/page.html"
    Received: "C:\\current\\dir\\test-source\\test\\page.ht
ml"

      1019 |       it("should handle extension without lead
ing dot when generating source path", () => {
      1020 |         const result = renderer.getSourceFileP
ath("test/page", "html");
    > 1021 |         expect(result).toBe("/current/dir/test
-source/test/page.html");
           |                        ^
      1022 |       });
      1023 |
      1024 |       it("should generate correct source file
path", () => {

      at Object.<anonymous> (tests/Renderer.test.ts:1021:24
)


Test Suites: 3 failed, 10 passed, 13 total
Tests:       37 failed, 305 passed, 342 total
Snapshots:   0 total
Time:        9.347 s
Ran all test suites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackageIssues related to packages under the packages directory

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions