Skip to content

gno test Clarify and limit test file usage #4178

Open
@moul

Description

@moul

This proposal aims to simplify and clarify the structure and usage of test files in Gno.

Proposal (short-term goals):

  • Only allow _test.gno files to reside alongside .gno files in the same directory.
  • Support an optional testfiles/ or testdata/ directory. If present, it can contain _filetest.gno and .txtar files. Move _filetest.gno to filetests/* folder. #846
  • When executing _filetest.gno or .txtar files, display a warning indicating that these are internal testing tools, subject to change or removal, and recommend using _test.gno files for standard testing.

Long-term goals:

  • Deprecate _filetest.gno in favor of testable func Example() functions, similar to Go’s testing approach. proposal: testable markdown documentation #2245
  • Gradually phase out .txtar files as a public testing mechanism, retaining them as internal tools for advanced use cases.

Related:

  • #1346 – proposal: removing filetests for end-users
  • #1269 – improve txtar DX
  • #846 – Move _filetest.gno to filetests/* folder
  • #2245 – proposal: testable markdown documentation

cc @thehowl @gfanton

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions