jasmine-browser-runner
Serve and run your Jasmine specs in a browser
Last updated a year ago by slackersoft .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jasmine-browser-runner 
SYNC missed versions from official npm registry.

Build Status

This is still a bit of a work in progress, working towards making this package usable by more than just Jasmine itself.

Getting started

npm install --save-dev jasmine-browser

or

yarn add -D jasmine-browser

Add a spec/support/jasmine-browser.json. For example:

{
  "srcDir": "src",
  "srcFiles": [
    "**/*.js"
  ],
  "specDir": "spec",
  "specFiles": [
    "**/*[Ss]pec.js"
  ],
  "helpers": [
    "helpers/asyncAwait.js"
  ],
  "random": true
}

You can also use the --config option to specify a different file. This file can be a JSON file or a javascript file that exports a object that looks like the JSON above.

Start the server:

npx jasmine-browser serve

Run the tests in a browser (defaults to Firefox)

npx jasmine-browser runSpecs

Want more control?

var path = require('path'),
  jasmineBrowser = require('jasmine-browser'),
  jasmineCore = require('../../lib/jasmine-core.js');

var config = require(path.resolve('spec/support/jasmine-browser.json'));
config.projectBaseDir = path.resolve('some/path');

jasmineBrowser.startServer(config, { port: 4321 });

Current Tags

  • 0.3.0                                ...           latest (a year ago)

5 Versions

  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (6)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |