Coder Social home page Coder Social logo

karma-slimerjs-launcher's Introduction

karma-slimerjs-launcher

js-standard-style npm version npm downloads

Build Status Dependency Status devDependency Status

Launcher for SlimerJS.

Installation

The easiest way is to keep karma-slimerjs-launcher as a devDependency in your package.json. You can simply do that, by running

$ npm install karma-slimerjs-launcher --save-dev

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    browsers: ['SlimerJS'],
  })
}

You can pass list of browsers as a CLI argument too:

$ karma start --browsers SlimerJS,Chrome

For more information on Karma see the homepage.

karma-slimerjs-launcher's People

Contributors

aymericbeaumet avatar dignifiedquire avatar hashchange avatar mattlewis92 avatar nagyv avatar nfroidure avatar zzo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

karma-slimerjs-launcher's Issues

Depend on slimerjs

Any reason this doesn't depend on slimerjs as the phantomjs launcher depends on phantomjs..? Its kind of annoying to have to tell people to run npm i -g slimerjs to run the unit tests

slimerJS bat executable doesn't work in windows

I guess it should works well using the dot bat file on Windows? .. and is not. Either the documentation is not clear or something is missing here, SlimerJS.exe doesn't exists in the downloadable package from the slimmerJS website. Where comes from SlimerJS.exe defined in this module?

The launcher is not able to start the launcher if I point my SLIMERJS_BIN to my executable here "C:\bin\slimerjs\slimer.bat" or "C:\bin\slimerjs"

    ERROR [launcher]: Cannot start SlimerJS

Can't install via NPM

Hi,
currently I'm not able to install karma-slimerjs-launcher via NPM.
This is due to a bug in NPM. When trying to install, NPM tries to load slimerjs as dependency but fails because it tries to download version 0.9.6 but then tries to unpack version 0.9.5. (see graingert/slimerjs#34)
As a workaround (until the bug in NPM is fixed) it would be great if the current dependency of slimerjs could be pinned to version 0.9.6-2

The Launcher is loading the wrong Firefox and SlimerJS versions

Hello, I'm trying to integrate SlimerJS with Karma to be able to test ECMAScript 6 code, but karma-slimerjs-launcher is loading an older version of both Firefox and SlimerJS.

When I test code directly with SlimerJS by command:

smilerjs test_file.js

It loads the version 0.10.2 that I installed.
My Firefox installed is version 50.1.0 and it works correctly with SlimerJS when I call it directly through SlimerJS because the SLIMERJSLAUNCHER variable has been configured correctly as the SlimerJS documentation indicates.

However when I call Karma the launcher is running Firefox 38 and SlimerJS 0.9.6 and so I lose support for ECMAScript 6.

How can I make karma-slimerjs-launcher call the versions of Firefox and SlimerJS that I have installed on my system instead of calling those embedded versions that it seems to bring?

Thanks.

Karma fails to kill SlimerJS

Here is what I get.
WARN [launcher]: SlimerJS was not killed in 2000 ms, sending SIGKILL.

And the process just hang on.

Update version of SlimerJS

The package is using [email protected], which is deprecated. Also there are couple of npm audit vulnerabilities from this version of SlimerJS.

  Moderate        Prototype pollution

  Package         hoek

  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > hawk > boom >
                  hoek

  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution

  Package         hoek

  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > hawk >
                  cryptiles > boom > hoek

  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution

  Package         hoek

  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > hawk > hoek

  More info       https://nodesecurity.io/advisories/566


  Moderate        Prototype pollution

  Package         hoek

  Patched in      > 4.2.0 < 5.0.0 || >= 5.0.3

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > hawk > sntp >
                  hoek

  More info       https://nodesecurity.io/advisories/566


  Moderate        ReDoS via long string of semicolons

  Package         tough-cookie

  Patched in      >=2.3.0

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > tough-cookie

  More info       https://nodesecurity.io/advisories/130


  High            Regular Expression Denial of Service

  Package         tough-cookie

  Patched in      >=2.3.3

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > tough-cookie

  More info       https://nodesecurity.io/advisories/525


  Moderate        Remote Memory Exposure

  Package         request

  Patched in      >=2.68.0

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request

  More info       https://nodesecurity.io/advisories/309


  Moderate        Memory Exposure

  Package         tunnel-agent

  Patched in      >=0.6.0

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > request > tunnel-agent

  More info       https://nodesecurity.io/advisories/598


  Moderate        Memory Exposure

  Package         concat-stream

  Patched in      >=1.5.2 || >=1.4.11 <1.5.0 || >=1.3.2 <1.4.0

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > extract-zip >
                  concat-stream

  More info       https://nodesecurity.io/advisories/597


  Low             Regular Expression Denial of Service

  Package         debug

  Patched in      >= 2.6.9 < 3.0.0 || >= 3.1.0

  Dependency of   karma-slimerjs-launcher [dev]

  Path            karma-slimerjs-launcher > slimerjs > extract-zip > debug

  More info       https://nodesecurity.io/advisories/534

There is already a new version of SlimerJS, namely 1.0.0. It would be great if you release a new version of the package, with updated dependency.

slimerjs fails

I'm trying to run my jasmine tests with the slimerjs launcher. I'm able to run slimerjs through xvfb to get a simple console.log output. My tests are running with PhantomJS too. Thus it seems like the slimerjs launcher is the problem.

Versions:
npm:

slimerJS:

  • SlimerJS 0.9.0 Standalone edition

OS:

  • Ubuntu 12.04, 100% console mode, just the required Gtk/X libs for SlimerJS to start with xvfb

The output at the bottom was generated with:

$ SLIMERJS_BIN=/path/to/xvfb-slimerjs karma start tests/karma-unit.conf.js --browsers SlimerJS --logLevel=debug

where xvfb-slimerjs is a simple wrapper

$ cat /path/to//xvfb-slimerjs 
#!/bin/bash
xvfb-run ./slimerjs $@

the karma output is:

INFO [launcher]: Starting browser SlimerJS
DEBUG [launcher]: Creating temp dir at /tmp/karma-85054306
DEBUG [launcher]: var page = require("webpage").create();

page.onConsoleMessage = function () {
    console.log.apply(console,
        Array.prototype.slice.call(arguments,0).forEach(function(item) {
            return JSON.stringify(item);
        })
    ); 
};
page.open("http://localhost:9876/?id=85054306");

DEBUG [launcher]: /mnt/data/bamboo-user/slimerjs-0.9.0/xvfb-slimerjs --debug=true /tmp/karma-85054306/capture.js
DEBUG [watcher]: Resolved files:
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/node_modules/karma-jasmine/lib/jasmine.js
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/node_modules/karma-jasmine/lib/adapter.js
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/vidzor/base/static/components/jquery/jquery.js
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/vidzor/base/static/js/session.min.js
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/vidzor/base/static/js/browserDetect.js
    /home/bamboo/bamboo-agent-home/xml-data/build-dir/VID-QUIC3-SUR/vidzor/vidzor/base/static/js/tests/browserDetect.unit.js
DEBUG [launcher]: Process SlimerJS exitted with code 127
ERROR [launcher]: Cannot start SlimerJS

From the last few lines, it seems to me as if SlimerJS would have been launched, and it actually opened the requested files, but in the end it still exited abnormally.
Actually, when running the simple console.log script, I'm facing a similar, "SlimerJS does not exits" issue as already reported at #1.

Fails on Windows. Fix is available, please pull it

I didn't get Karma to start SlimerJS on Windows, and I've spent a couple of hours grappling with the config. It was clear from the source, though, that this thing has never even once worked on Windows, given the DEFAULT_CMD setting.

As it turns out, PR #5 solves the problem right away. It's been sitting there for four months already, please pull it. Thanks!

npm installs outdated version

Unfortunately, npm install karma-slimerjs-launcher does not install the latest version, and the fixes in #10 don't make it to disk.

@aymericbeaumet This should be easy to fix. My guess is that the version in package.json needs to be changed to 0.1.3, then npm publish.

Cheers! Michael

Finding a new maintainer

I do not use this plugi anymore and will not be able to maintain it longer. If you use it, please claim its ownership!

Trying to run SlimerJS scripts: Can't find `webpage`

I am trying to run SlimerJS scripts using this launcher. I had to use Browserify because otherwise the script was throwing an exception because require is not defined.

Now I'm getting this error: [framework.browserify]: Error: Cannot find module 'webpage'.

Here's the source of the exception: var page = require("webpage").create();

Any ideas on how to run SlimerJS scripts in Karma, so I can use Jasmine's assertions?

Thanks.

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.