Giter Site home page Giter Site logo

Comments (5)

zeke avatar zeke commented on July 24, 2024

Hi, @violinner. Take a look at the electron-api-demos codebase. That should get you started:

https://github.com/electron/electron-api-demos/blob/3afe1789efbec9b15b0ee04d10cb0bdacb537ed2/package.json#L12

https://github.com/electron/electron-api-demos/blob/3afe1789efbec9b15b0ee04d10cb0bdacb537ed2/tests/index.js

from spectron.

violinner avatar violinner commented on July 24, 2024

Zeke, great demo and starting point for electron.
How can I run the test in tests.index.js? This is where my original question comes in.

Invoiking "electron tests/" or "node tests/" creates an error "describe is not defined."
Do you have any advice on how to run the spectron test, or the test in spectron "Get Started"?

Thanks!

from spectron.

zeke avatar zeke commented on July 24, 2024

How can I run the test in tests.index.js?

The command to run the tests is specified in package.json under scripts.test.

To run the tests, type npm test

To see all the scripts you can run, type npm run

from spectron.

violinner avatar violinner commented on July 24, 2024

"npm test" runs a mocha test that fails, apparently on initialization.

Should the app be started first, or is the test intended to launch the app?

The electron demo app Gui did not start automatically, but can be run by itself.

from spectron.

zeke avatar zeke commented on July 24, 2024

I see you opened another ticket at electron/electron-api-demos#242 -- we can continue there.

from spectron.

Related Issues (20)

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.