GSoC’18 : Week 3 Live

Mayank Lunayach
2 min readJun 4, 2018

--

As I entered into week 3, my first task was to have all the previously written Angular tests pass. Doing this was a fantastic learning experience.
Like this one. Don’t cheat while doing testing. Hmmm. I had a couple of components which were using a service that emitted observables. I instead of mocking tried to go the component way. That is, I subscribed to the service first using .subscribe() and then when it resolved, wrote the UI testing specs. Well, it did the job but partially. When I tested only that component, it was good. Things, became terrible when I ran tests for the whole application. Received dreadful errors like “ng Context ERROR”

StackOverflow didn’t help either. Seeing, messages like ‘Context Error’ gave me intuitions that something may be wrong with that subscribe thing. So, I replaced all those .subscribe() usages with proper spying the service in place.

The latter part of the week was devoted to the creativity part. I made the second game “Stride Against Malaria.” I again used Raphael. I don’t know, but I’m in just love with the simplicity that this library offers while being wholly typed for Typescript. This was a touch complex from the previous one because this involved animated transformations. With great feedback from mentors in the weekly meeting, I was able to improve it further.

Screenshot from the game

All and all it was again a great learning experience this time round as well.

Edit-1: My previous blog, where I discussed about Raphael. https://medium.com/@speedspeeder1/live-gsoc-week-ii-758ae6ac3928

--

--