forked from karma-runner/karma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
[Cloud9 IDE] is an open source web-based cloud integrated development environment that supports several programming languages, with a focus on the web stack (specifically JavaScript and [NodeJS]). It is written almost entirely in JavaScript, and uses [NodeJS] on the back-end. | ||
[Cloud9 IDE] is an open source web-based cloud integrated development environment that supports | ||
several programming languages, with a focus on the web stack (specifically JavaScript and NodeJS). | ||
It is written almost entirely in JavaScript, and uses NodeJS on the back-end. | ||
|
||
## Configuration | ||
|
||
There are two possibilities in order to run unit tests with Karma in [Cloud9 IDE]: | ||
First, make sure the `karma.conf.js` includes the following entries: | ||
|
||
```javascript | ||
hostname: process.env.IP, | ||
port: process.env.PORT | ||
``` | ||
|
||
## Capture the browser manually on the local machine | ||
|
||
Open `http://<projectName>.<cloud9User>.c9.io/` in your browser. | ||
You can use any of your local browsers. | ||
|
||
## Run Karma unit tests with PhantomJS in cloud9 IDE | ||
```bash | ||
# Start Karma without browsers: | ||
$ karma start --no-browsers | ||
``` | ||
|
||
### Install PhantomJS | ||
PhantomJS must be installed with `npm install phantomjs`. | ||
Now, open `http://<projectName>.<cloud9User>.c9.io/` in your browser. | ||
|
||
### Configure Karma | ||
The `karma.conf.js` file must include the following entries: | ||
## Run Karma unit tests with PhantomJS | ||
|
||
```javascript | ||
browsers: ['PhantomJS'], | ||
hostname: process.env.IP, | ||
port: process.env.PORT | ||
It is also possible to run headless PhantomJS on the Cloud9 server. | ||
|
||
```bash | ||
# Install the PhantomJS plugin: | ||
$ npm install karma-phantomjs-launcher | ||
|
||
# Start Karma: | ||
$ karma start --browsers PhantomJS | ||
``` | ||
|
||
[Cloud9 IDE]: https://c9.io/ | ||
[NodeJS]: http://nodejs.org/ |