Skip to content

Commit

Permalink
Merge pull request RocketChat#139 from blainesch/mocha
Browse files Browse the repository at this point in the history
Mocha + Travis
  • Loading branch information
szwacz committed Mar 23, 2016
2 parents 40671a5 + cce7435 commit faca746
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 4,141 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js

node_js:
- "node"

before_script:
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var paths = {

#### Unit tests

electron-boilerplate has preconfigured [jasmine](http://jasmine.github.io/2.0/introduction.html) test runner. To run the tests go with standard:
electron-boilerplate has preconfigured [mocha](https://mochajs.org/) test runner with the [chai](http://chaijs.com/api/assert/) assertion library. To run the tests go with standard:
```
npm test
```
Expand Down
6 changes: 1 addition & 5 deletions app/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ app.on('ready', function () {
mainWindow.maximize();
}

if (env.name === 'test') {
mainWindow.loadURL('file://' + __dirname + '/spec.html');
} else {
mainWindow.loadURL('file://' + __dirname + '/app.html');
}
mainWindow.loadURL('file://' + __dirname + '/app.html');

if (env.name !== 'production') {
devHelper.setDevMenu();
Expand Down
5 changes: 3 additions & 2 deletions app/hello_world/hello_world.spec.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Named imports test
import { expect } from 'chai';
import { greet, bye } from './hello_world';

describe("hello world", function () {

it("greets", function () {
expect(greet()).toBe('Hello World!');
expect(greet()).to.equal('Hello World!');
});

it("says goodbye", function () {
expect(bye()).toBe('See ya!');
expect(bye()).to.equal('See ya!');
});

});
16 changes: 0 additions & 16 deletions app/spec.html

This file was deleted.

130 changes: 0 additions & 130 deletions app/vendor/jasmine/boot.js

This file was deleted.

Loading

0 comments on commit faca746

Please sign in to comment.