mardi 24 avril 2018

How to test below code?

Bellow code is written in javascript. I need testing using jest or mocha framework. I want to test for prefix_value.

updatePrefix: function (event) {
  if (typeof event === 'string') {
    this.prefix_value = event
  } else if (typeof event === 'object') {
    this.prefix_value = event[0]
  }
},

Aucun commentaire:

Enregistrer un commentaire