duckduckgo-documentation
duckduckgo-documentation copied to clipboard
Testing pages (https://duck.co/duckduckhack/test_files) is too vague
Hey,
IMO, the testing page could do with explaining that the text, html and heading outputs need to be tested as a whole. Currently this isn't obvious and I can't actually find an example in the docs of the html or headings being tested!
Thanks,
:+1:
This page implies that Spice IA's can only be tested for correct triggering. Not sure if that's true.
Also, I'd say that the Goodie test example could use improvement: it's coupled directly to the exact HTML output. This means that the tests will fail for inconsequential formatting changes. Instead, the tests should reflect the spec, or the stories of the feature.
@dogweather AFAIK only triggers can be tested on Spices; there's no JS testing available atm. WRT to the goodies, the output can be pattern matched with regex etc so it's plausible to ensure that they key-content is present in the output, or alternatively the range of values are correct etc.
With Structured answers (and hopefully templates @moollaza ?) the output from the goodie will be more separate from the presentation so we can be more precise with the tests!