Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

jasmine/jasmine-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

213f1d4 · Jul 2, 2021
Apr 25, 2021
May 8, 2021
Jul 2, 2021
Jul 2, 2021
Jul 31, 2018
Nov 18, 2017
Jul 12, 2017
Aug 10, 2013
Sep 14, 2016
May 8, 2021
Jul 2, 2021
Jul 19, 2017
May 8, 2021
Jul 2, 2021
Jul 2, 2021
Nov 7, 2017

Repository files navigation

Jasmine... For Python!

FOSSA Status

Build Status

The Jasmine Python package contains helper code for developing Jasmine projects for Python-based web projects (Django, Flask, etc.) or for JavaScript projects where Python is a welcome partner. It serves up a project's Jasmine suite in a browser so you can focus on your code instead of manually editing script tags in the Jasmine runner HTML file.

For documentation on writing Jasmine tests, check out the Jasmine Documentation site.

Deprecated

The Jasmine packages for Python are deprecated. There will be no further releases after the end of the Jasmine 3.x series. We recommend migrating to the following options:

  • jasmine-browser-runner (npm install jasmine-browser-runner) to run specs in browsers, including headless Chrome and Saucelabs. This is the most direct replacement for the jasmine serverandjasmine cicommands provided by thejasmine` Python package.
  • The jasmine npm package (npm install jasmine) to run specs under Node.js.
  • The standalone distribution from the latest Jasmine release to run specs in browsers with no additional tools.
  • The jasmine-core npm package (npm install jasmine-core) if all you need is the Jasmine assets. This is the direct equivalent of the jasmine-core Python package.

Except for the standalone distribution, all of the above are distributed through npm.

Contributing

Please read the contributor's guide.

Contents

This package contains:

  • A small server that builds and executes a Jasmine suite for a project
  • A command line script to run your tests (handy for continuous integration)

You can get all of this by: pip install jasmine or by adding jasmine to your requirements.txt.

_init_ A Project

To initialize a project for Jasmine:

$ jasmine init

This will create a spec directory and configuration yaml template for you.

Configuration

Customize spec/javascripts/support/jasmine.yml to enumerate the source files, stylesheets, and spec files you would like the Jasmine runner to include. You may use dir glob strings.

Usage

Standalone Server

Start the Jasmine server:

$ jasmine server

Point your browser to localhost:8888. The suite will run every time this page is re-loaded.

Start Jasmine on a different port:

$ jasmine server -p 1337

Point your browser to localhost:1337.

For a full list of commands, type jasmine -h

Continuous Integration

For Continuous Integration environments, add this task to the project build steps:

$ jasmine ci

The browser used by selenium can be changed by exporting JASMINE_BROWSER

$ export JASMINE_BROWSER=phantomjs
$ jasmine ci

or adding --browser to jasmine-ci

$ jasmine ci --browser phantomjs

For a full list of commands, type jasmine ci -h

Support

Documentation: jasmine.github.io Jasmine Mailing list: jasmine-js@googlegroups.com Twitter: @jasminebdd

Please file issues here at Github

Copyright (c) 2008-2017 Pivotal Labs. This software is licensed under the MIT License.

License

FOSSA Status