drashland / sinco

Browser Automation and Testing Tool for Deno, written in full TypeScript
https://drash.land/sinco
MIT License
58 stars 3 forks source link

Unit tests: combine into one test file #85

Closed ebebbington closed 2 years ago

ebebbington commented 3 years ago

Summary

What:

Right now we have firefox and chrome tests, both test files are 99% the same. Combine test files into one by defining test cases inside a loop

Why:

Test files are 99% the same, thus duplicating a tonne of a logic, this could be solved by looping through each browser typr

How:

Pserudo code impl


// tests/unit/client_test.ts
["firefox", "chrome"].forEach(type => {  
Deno.test
(type + " goTo() ) => {} )
})
ebebbington commented 2 years ago

done as part of #91