zotero / translation-server

A Node.js-based server to run Zotero translators
Other
123 stars 52 forks source link

Implement translator tests #36

Closed dstillman closed 5 years ago

dstillman commented 6 years ago

https://github.com/zotero/zotero/blob/master/chrome/content/zotero/tools/testTranslators/translatorTester.js

retorquere commented 5 years ago

I've abstracted the test extraction in https://github.com/zotero/translation-server/pull/96 so that web and search tests can be done the same way as the import tests, but I'm getting a lot of UnhandledPromiseRejectionWarning for which I haven't been able to track down what causes them.

dstillman commented 5 years ago

Sorry, that's a misunderstanding — we don't want to use web and search tests in translation-server tests, and that's not what this issue was for. This is already done and in use to generate https://translator-tests.zotero.org/.

retorquere commented 5 years ago

Got it.

dstillman commented 5 years ago

(To explain a bit further, web and search tests are dependent on external resources that can change at any time, so they're not appropriate for CI tied to specific commits. The point of the translator tests is to make sure we're still generating the appropriate output for those sites when either the sites change or the translators change, with the latter tested by the developer modifying the translator in Scaffold. We might occasionally catch a client or translation-server bug from those tests, but that's not their primary purpose.)