Skip to content

Fix failing test on the main branch #65

@Shubh-Raj

Description

@Shubh-Raj

Description

There are test failures on the main branch that need to be addressed.

Failing Tests

1. TemplateArchiveProcessor - should draft a template (Consistent Failure)

File: test/TemplateArchiveProcessor.test.ts

Error: ValidationException: Model violation in the "org.accordproject.commonmark@0.5.0.Document" instance. The field "nodes" has a value of "undefined". Expected type of value: "Node[]".

Cause: The draft() method returns an AgreementMark document with undefined nodes field, which fails Concerto validation.

2. JavaScriptEvaluator - should pass stress test with javascript safe (Flaky/Intermittent)

File: test/JavaScriptEvaluator.test.ts

Error: expect(error).toBeFalsy() receives {code: 0, elapsed: 195, result: undefined}

Cause: This appears to be a timing/race condition in the parallel execution stress test. It fails intermittently.

Steps to Reproduce

npm install
npm test

Environment

  • Node: v20+
  • OS: Linux
  • Branch: main

Additional Notes

  • The JavaScriptEvaluator test may not fail on every run (flaky)
  • A worker process warning about force exit suggests possible resource leaks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions