Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 node_modules
Octocat-spinner-32 specs
Octocat-spinner-32 src
Octocat-spinner-32 tools
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 jsTestDriver.conf
Octocat-spinner-32 pom.xml
Octocat-spinner-32 tests.html
Octocat-spinner-32 tests.js
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.