Skip to content

Should the command fixture test inputs be self-testing? #80

@JayBazuzi

Description

@JayBazuzi

Two problems we maybe care about:

  • How do we know that the command fixture test inputs are valid programs?
  • How do we know that the output valid and equivalent to the input?

Proposed solution:

  • Every input includes an assertion.
  • The test runner compiles and runs the input, to ensure that the input is valid and does what we think.
  • The test runner compiles and runs the actual result, to ensure that the results is valid and does the same thing

For example, for rename the input program might look like:

const x = 42;
expect(x).toBe(42);

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionIssues where community input is encouraged to help refine the ideaQuality ChecksTasks that add to post-commit quality check systemenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions