mercredi 20 décembre 2017

Testing URL query string in nodejs

Hey everyone I made a package that can manage and control URL query strings. I publish it throw npm. and wrote some tests to the core of the package

"parser.js" - that parse the query string to an object

"strigifyer.js" - that make an object to URL query string

I test those files for now with "mocha" and "expect"

there is one main file that manage the above files and the file is also push to query string to URL without refresh. it uses the window.history object.

what should I do to success to test the main file (index.js)?

I need the window and history objects to check if there is a change after I use my api.

here is the package if its help: http://ift.tt/2oYWn33

thank you.

Aucun commentaire:

Enregistrer un commentaire