Spectron is a great tool for testing your Electron applications. However, some help is needed to get the full use out of it. This post will go through all of the npm packages I’ve found useful in my Spectron testing.
The default reporter for Spectron is to just log out to the terminal. That’s great, but I like pretty colors in my terminal, especially when they’re green for success and red for error. That’s where the jasmine reporters package comes in. Actually, there are a few reporters in this package. Not just one for the terminal. In fact, I use two reporters from this package – the terminal reporter and the JUnit XML Result reporter.
Why do I use the second reporter? Well, that reporter plays very well with the jasmine-xml2html-converter package. This package converts the XML results from the JUnit XML Result reporter into an HTML file with graphs and a much easier way to view the tests.
Something I’ve used that seemed to help is to break up your gulp tasks to run tests by scenario.… Read more
The code included a package called left-pad, which pads out strings with zeroes or spaces and had been downloaded by developers from the NPM repository more than 2 million times in the past month. Its removal caused a chain reaction among apps with dependencies on left-pad built in.
In a postmortem on the incident, published on its blog Wednesday, NPM admitted it “dropped the ball in not protecting [developers] from a disruption caused by unrestricted unpublishing.”
“We’ve hit an inflection point in the size of the community and how critical npm has become to the Node and front-end development communities,” says NPM, adding that going forward, the company “will make it harder to un-publish a version of a package if doing so would break other packages.”
The blog post also addressed the dust-up that led the incident, in which Koçulu was contacted by the social network Kik about a module he’d published on NPM, also named Kik.… Read more