I don't know JavaScript: Promises & typeof null == "object"

My plan for this blog isn’t to make it a place to vent anger and frustration, don’t count this post as one, this post is about sharing learning experience and impressions. Last night I spent around 6 hours to investigate an issue in a failing javascript test, simply because I didn’t realize that this condition may ever pass: if(typeof null == 'object') .... I mean, Seriously ? that wasn’t expected at all....

October 26, 2017 · 4 min · Mohannad Najjar

Testing Vue: note on Sinon & Vue DOM Event Handler

One of the most outstanding features of vue is how templates bind event handlers to elements. alot of cool stuff that makes the template is really “cool” to read and look at! Recently I was writing a test for a Vue component, and I noticed this issue. In short, the issue is: I can’t spy on the increment method on the template: <input @click="increment">. Background: Vue offers different ways of binding event handlers to elements, for example: <input v-on:click="counter++"> or <input @click="counter++"> or <input @click="methodName" and many other options....

October 26, 2017 · 3 min · Mohannad Najjar

How I got into testing: Unit Testing

Recently I started discovering software testing tools, unit testing, end-to-end/integration/acceptance testing, test-driven-devlopment, and this whole new world to me. As a beginner, I felt it’s good to document how I got into this point. before, I was ignoring testing topics and thinks of it as a mystified world that I may or may not reach sometime in the future. Unit Testing 1- Contributing to Laravel: Oneday between November 2016 to May 2017, while I was working on a laravel 5....

October 14, 2017 · 4 min · Mohannad Najjar