EtherAddressLookup icon indicating copy to clipboard operation
EtherAddressLookup copied to clipboard

Unit Test - DOM Manipulation

Open Samyoul opened this issue 7 years ago • 4 comments

With reference to issue #144 Applying tests to https://github.com/409H/EtherAddressLookup/blob/master/js/DomManipulator.js

Particularly the changes that will be merged in with pull request https://github.com/409H/EtherAddressLookup/pull/140

Perhaps we can add a milestone to keep track of all the unit testing have done and need to do.

Samyoul avatar Oct 30 '17 11:10 Samyoul

Perhaps we can add a milestone to keep track of all the unit testing have done and need to do.

Milestone added! :1st_place_medal:

409H avatar Oct 30 '17 11:10 409H

I'm trying to get Mocha / Node to stop complaining about the chrome object to get unit testing functioning. We may need to rewrite the EtherAddressLookup constructor to take the chrome object as a parameter, so we can test with https://github.com/acvetkov/sinon-chrome and use the class as it currently does.

I'll submit my suggestion in a pull request, and see if there are any other dependencies that need to be injected into the class, but I think chrome is the only one.

Samyoul avatar Nov 02 '17 13:11 Samyoul

Okay - sounds good!

What is it currently saying regarding the chrome object?

409H avatar Nov 02 '17 13:11 409H

Node says chrome doesn't exist, but that's because node is server side and we need to either run a headless browser on the server or mock the browser object or run the tests on the client side

Samyoul avatar Nov 07 '17 16:11 Samyoul