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

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

Open
shadowgate15 opened this issue Mar 21, 2021 · 0 comments
Open

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

shadowgate15 opened this issue Mar 21, 2021 · 0 comments

Comments

@shadowgate15
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant