Skip to content

🚀 Feature: Improve Stratum Block stringification in general test snapshots #314

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Feature Request Checklist

Overview

Suppose a Stratum Block's test has it produce a creation: Creation with addons. If the test runs something like Vitest snapshots / expect(creation).toMatchInlineSnapshot(), the addons will look something like:

"addons": [
    {
      "addons": {
        ...
      },
      "block": [Function],
    },

https://github.com/JoshuaKGoldberg/create-typescript-app/blob/fb5608558148b767922b95304176539f24a0f381/src/blocks/blockKnip.test.ts#L21-L32

That "block": [Function] is not very specific. It'd be good to mention the Block's about?.name in some way.

Additional Info

This is a little tricky because nothing in Bingo should be hardcoded to any one testing framework. A solution to this PR should work for Jest, Vitest, and theoretically any other test framework with snapshots.

💝

Metadata

Metadata

Assignees

No one assigned

    Labels

    engine: stratumPertaining to the "Stratum" ("blocks") templating engine.status: accepting prsPlease, send a pull request to resolve this! 🙏type: featureNew enhancement or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions