Giter VIP home page Giter VIP logo

Comments (7)

sindresorhus avatar sindresorhus commented on July 20, 2024

How would you imagine testing the app? Like what kind of testing would you like specifically?

from electron-boilerplate.

artoale avatar artoale commented on July 20, 2024

I was thinking of basic unit tests running inside Electron. Possibly something that supports test-on-save, but that could probably be an afterthought. I think it should be as simple as possible, and, as said, support testing both main-process modules and in-browser code.

from electron-boilerplate.

sindresorhus avatar sindresorhus commented on July 20, 2024

Yeah, I got that, but what would it test?

from electron-boilerplate.

artoale avatar artoale commented on July 20, 2024

Sorry, not sure I understand what you're asking (and sorry if I'm giving the wrong answer). What I mean is that, when developing an app within electron, you can't just unit-test your modules with e.g. karma, since electron architecture provides feature not generally available in a browser (namely, node bindings).
Assume that I write a twitter client for mac, I'll probably write a module to wrap the twitter APIs, one for auth, one for caching, etc..
I'd like to be able to unit-test each of this module in isolation and in the context execution of Electron.

The idea is: how would you set-up a testing environment for this? I suppose you should write a very simple (separate) Electron app which sets up jasmine/mocha/whatever and then run this app to test your code. Now, setting up this environment shouldn't be very hard, but it's the sort of thing that become very handy if provided with the boilerplate (or in the yo generator).

Hope this as clarified my request a bit, sorry again if I'm talking nonsense.

from electron-boilerplate.

sindresorhus avatar sindresorhus commented on July 20, 2024

That makes it totally clear. Thanks :)

I don't have an answer for you right now, but this is something I would need too, so I'll try to come up with something.

from electron-boilerplate.

jenslind avatar jenslind commented on July 20, 2024

Maybe we could add https://github.com/jprichardson/electron-mocha?

from electron-boilerplate.

sindresorhus avatar sindresorhus commented on July 20, 2024

Closing as Spectron is not well-maintained: electron-userland/spectron#359 Will do this if that ever changes.

from electron-boilerplate.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.