csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
392 stars 239 forks source link

Need help creating unit test with speech_to_text in my widget #553

Open Bazni opened 2 months ago

Bazni commented 2 months ago

Hey 👋

I'm writing tests and can't make it work even by mocking SpeechToText with Mocktail.

Is there any documentation on how to write tests with speech_to_text?

For now, I'm getting this error

The following MissingPluginException was thrown running a test:
MissingPluginException(No implementation found for method initialize on channel
plugin.csdcorp.com/speech_to_text)
sowens-csd commented 2 months ago

Great point, I haven't documented how to test with the plugin. I'll look at test strategies and add something to the docs.