Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Me myself and I @paul.souche paulsouche @paulsouche 2
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Disclaimer Deno is in v0.40.0 at the time I made this presentation. Some presented patterns may evolve in further releases. Purpose is to present the opinionated choices deno made in its architecture. 3
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 My first IT job interview 4 For the algorithm test we should begin with Fibonacci. Do you know it ? Yes, I studied it in highschool Ok great ! Could you begin with a unit test ? I never did a unit test of my life sorry ! but maybe can you help me ?
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Me at the time 6 Fibonacci master First IT job Need to learn everything about tests
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Resolution #1 Always learn a language / framework / library / … through tests 7
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Seven years later 8 deno test Hey Lilian ! Deno looks so great but how do you test ? Try yourself and make a presentation ! Ok but what are the patterns ? What do you write ? Ok then...
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Useful options 10 ● -A --allow-all to manage permissions ● --filter to filter spec files ● --inspect-brk to debug ● --log-level to debug
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Limitations 11 ● No watch mode out of the box ● Specs are executed sequentially (no parallelism) ● Coverage is missing ● Files must respect pattern (can be tricked with Deno.runTests())
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Now I can do job interviews myself 16 And have access to all job interviews reports
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 What I did at the time 3/3 : famous unit test 21
Paul SOUCHE Repository => https://github.com/paulsouche/unit-tests-in-deno Meetup Paris Deno 4/14/2020 Conclusion 25 ● deno dev experience is great (thanks to axetroy extension for vs code) ● testing std & cli are not production ready at all ● I hope the bench API will be kept