Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

[v1.7.1] can't test error when using mockPrompt #168

@shadowgate15

Description

@shadowgate15

Currently if you do the following:

test('invalid name', async (t) => {
  await t.throwsAsync(
    sao.mock({ generator }, { ...defaults, name: 'Foo Bar Baz Beep' }),
    { message: /package name cannot have uppercase letters/ }
  );
});

the return will be:

Error {
    message: 'validation failed for prompt: [object Object]',
  }

instead of returning the correct error. It does work correctly when not using mock.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions