vendredi 17 février 2017

How do I test a view library in intern.js?

I am building a library which uses backbone as a base. My library has a View class, which is an extension of Backbone.View. It has an HTML Element as a property of it. I have a bunch of new functions on the view and I want to test them with intern.

The problem is that I can't find a way to reference the DOM from intern itself. The only way I can see for this to work is to open up a remote URL of a separate HTML page, and query this DOM with leadfoot. This method seems great for a website where you go to specific pages to test your site, but I am trying to build a library, so it seems unnecessary to have separate pages just to test core features of a library.

Is there a way to test a view library without putting all of your code in dummy html files to open with leadfoot?

Aucun commentaire:

Enregistrer un commentaire