Testing named exported recursive functions using Jest
November 18, 2020 - 7 min readIn this post I will show you a functional approach for testing named exported recursive functions using Jest.
Written by Luis C. Ruiz. A proactive and disciplined Sr. Software Engineer with rock-solid programming skills in Javascript/Typescript.
In this post I will show you a functional approach for testing named exported recursive functions using Jest.
Early this year I was asked to give an introductory Javascript course of three classes (something I already did in the past twice). Although, I like teaching I had to reject the idea and suggested to change to Typescript, the result? I built a small project using Parcel.js bundler, shared it, and got ignored.
Based on a reusable Component I wrote before, I had the idea of improving its layout with an embedded template which will be instantiated inside the component with an attached context.
In this example I will use an Angular Material Autocomplete form control and show how to implement @angular/forms ControlValueAccessor interface to build a reusable form control. The form control will display a message (like an option) while it waits for results and a message when no results were found.
Why did I decide to start a Blog? What will I write about?