Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description key should appear in the Jest console. #3369

Open
aisflat439 opened this issue May 31, 2022 · 0 comments
Open

Description key should appear in the Jest console. #3369

aisflat439 opened this issue May 31, 2022 · 0 comments

Comments

@aisflat439
Copy link

Description

In this thread I explained what I expected the behavoir to be. David recommended I post this here.

Suppose I have a straightforward model:

const machine = createTestMachine({
  id: "commandPaletteMachineTest",
  initial: "closed",
  states: {
    closed: {
      on: {
        "control p": {
          target: "open",
        },
      },
    },
    open: {
      on: {
        "keypress Escape": {
          target: "closed",
        },
      },
    },
  },
});

Jest console renders something like this:

    ✓ Reaches state "#commandPaletteMachineTest.closed": control p → keypress Escape (89 ms)

This makes sense. I have "description" keys on each state so I'd expect if I update the previous to:

   open: {
      on: {
        "keypress Escape": {
          description: "cool message for the console!"
          target: "closed",
        },
      },
    },

I would get something like:

    ✓ Reaches state "#commandPaletteMachineTest.closed": control p → keypress Escape "cool message for the console!" (89 ms)

Expected result

The expected result is descriptions appear in the jest console.

Actual result

There was no description in the jest console.

Reproduction

none

Additional context

No response

@aisflat439 aisflat439 added the bug label May 31, 2022
@davidkpiano davidkpiano changed the title Bug: description key doesn't appear in the Jest console. Description key should appear in the Jest console. May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants