Skip to content

spec(ssr): conflicting tests — old tests expect error on SSR failure, new tests expect no error #166

Description

@zeroedin

PR #153 has contradictory test expectations for BuildPhase2 when the SSR command is not found:

Old tests (expect error):

  • Line 159: Expect(err).To(HaveOccurred(), "Phase 2 must attempt to invoke ssr.command")
  • Line 229: Expect(err).To(HaveOccurred(), "BuildPhase2 must return error when ssr.command is not found")

New tests (#164, expect NO error):

  • Line 368: Expect(err).NotTo(HaveOccurred(), "BuildPhase2 must not return a fatal error when SSR fails")
  • Line 387: Expect(err).NotTo(HaveOccurred(), "SSR failure for one page must not abort the build")

Both use a nonexistent command with pages containing custom elements. The old tests expect BuildPhase2 to return an error. The new tests expect it to skip failed pages and return a result with no error. These cannot both be satisfied simultaneously.

One resolution: the old tests could be updated to check that BuildPhase2 attempts the command (proven by the result containing original HTML) rather than requiring an error return.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions