Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This is a simple project that explains how to run Jasmine BDD specs over modules loaded with require.js, in three different environments: JsTestDriver, Node.js, Web browser
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
node_modules added node tests
specs now able to execute a simple test
src now able to execute a simple test
tools now able to execute a simple test
.gitignore now able to execute a simple test
README.md Update README.md
jsTestDriver.conf now able to execute a simple test
pom.xml Added Maven build support for this demo project. Just run: mvn clean …
tests.html specs can be executed in a web browser
tests.js added node tests

README.md

This is a simple project that explains how to run Jasmine BDD specs over modules loaded with require.js, in four different environments:

  • JsTestDriver
  • Node.js
  • Web browser
  • Maven build

Check out the wiki pages to see how I came up with this result:

https://github.com/podefr/jasmine-reqjs-jstd/wiki

Try it for yourself

After cloning/downloading the repository, if you want to execute the tests:

JsTestDriver

Change directory to the root of the project

java -jar tools/JsTestDriver/JsTestDriver-1.3.4.b.jar --port 4224 &

connect your browsers to http://localhost:4224/capture

java -jar tools/JsTestDriver/JsTestDriver-1.3.4.b.jar --tests all

Node.js

simply execute the tests.js file

node tests.js

Web browser

open the tests.html page

open tests.html

Maven build

simply execute:

mvn clean test

The Maven build will automatically start whatever the default browser is, it will start the JsTestDriver server automatically, and then it will execute the tests. Optionally, you can choose which browser to be used during tests by using the following command:

mvn clean test -DbrowserPath=path/to/my/browser
Something went wrong with that request. Please try again.