[api] Allow for multiple exports in required test files. Fixes #284 by manual merge of changes from @NemoPersona.