lundi 19 novembre 2018

How to test embed js script library?

I am working in a Javascript library to embed in the browser.

The thing is that I was started the proyect from https://github.com/krasimir/webpack-library-starter and I would to test my library but I have a problem with the DOM because my proyect hasn't got html so, I don't know how I should to test the DOM methods.

The library is to embed in to our clients websites, the idea is to make a embed script like google maps, analytics sdk, etc.

I am using chai and mocha to test but maybe I should to change to ava or something like.

I know that in React for example you have tools to simulate the DOM but it is in vanilla JS so... help please.

Aucun commentaire:

Enregistrer un commentaire