Code Monkey home page Code Monkey logo

Comments (4)

twolfson avatar twolfson commented on July 20, 2024

This is expected behavior. When we shut off useIframe, Karma moves to using window.open instead so there are 2 windows:

  • Karma's test harness (communicates to Node.js, starts new test runs)
  • Karma's test runner (loads testing framework/test files, communicates success/fail information to test harness via window.parent)

To demonstrate this point further, we could disable useIframe in other browsers and see the same result (e.g. Chrome, Firefox)

from karma-electron.

luchillo17 avatar luchillo17 commented on July 20, 2024

The thing is that without useIframe: false we lose nodeIntegration, but with it, it shows 2 windows, with the second being incredibly annoying poping up all the time.

I guess the idea is to run with --show flag off and only show when we need to debug the tests, right?

from karma-electron.

twolfson avatar twolfson commented on July 20, 2024

Yep, typically showing the window isn't too helpful as content is often added/remove quicker than we can see. To make it less painful to add/remove the --show flag in karma.conf.js, I use the following setup:

Add ElectronVisible browser but don't set it as default browser:

    browsers: ['Electron'],
    customLaunchers: {
      ElectronVisible: {
        base: 'Electron',
        flags: ['--show']
      }
    }

Override default browsers via CLI:

karma start --browsers ElectronVisible
# or for `npm-scripts`
npm run test-karma -- --browsers ElectronVisible

from karma-electron.

luchillo17 avatar luchillo17 commented on July 20, 2024

Nice 😄

from karma-electron.

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.