Weekly Check-In #5
vinayaksh42
Published: 07/05/2021
Hey all!
What did you do this week?
This week I worked on implementing various different types of tests using JEST. There are a total of 3 different test suites for the 3 different types of icons (filled/outlined/animated). The tests are for checking if or not the produced React SVG component is being built in the right manner. The tests also contain a check for the various different props (color/size/rotation/flip). These tests will provide a setup in which we will be able to verify future addition to the React component template. I have added a new prop that is the flip prop. The flip prop consists of two different sub-props, that is horizontalFlip and verticalFlip. The flip prop required a function for fetching the values of scaleX, scaleY, TranslateX and TranslateY. I added a common function which will provide the React component with the correct transformation values depending upon the Flip prop. I have also setup the semantic versioning for the repo and published a early version of the package to npm, so that it is easy to test out the package that is being produced.
EOS-Icons React. Upon testing the actual load that is being put by the package for using a single icon equals to roughly 1kb, Which shows that the package is working in a tree shaking manner (only the load of icon being used is put).
What is coming up next?
For the upcoming week I am going to work mainly on making a Documentation on "how to use Eos-icons React" as well as work on improving the code overall so that we can move towards a complete launch of the new package.
Did I stuck anywhere?
I got a bit stuck on the decision for picking out the best framework for testing out the package. With the help of my mentors I was finally able to implement all the tests using JEST.