Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ sudo: false
node_js:
- 0.12
script:
- npm run karma
- npm run test
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"test": "test"
},
"scripts": {
"test": "mocha",
"karma": "./node_modules/.bin/karma start --single-run --no-auto-watch --browsers PhantomJS; exit 0"
"test": "./node_modules/.bin/karma start --single-run --no-auto-watch --browsers PhantomJS"
},
"repository": {
"type": "git",
Expand Down
28 changes: 8 additions & 20 deletions test/specs/basics.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
var expect = chai.expect;
var should = chai.should();

// load basics.js into new VM

describe( 'Main', function() {
var sandbox;

Expand Down Expand Up @@ -37,20 +32,11 @@ describe( 'Main', function() {
});
});

describe('canDrive', function() {
it ('should be true if `person` is atleast 16 years old', function() {
expect(canDrive).to.exist;
(typeof canDrive).should.equal('boolean');
canDrive.should.equal(person.age >= 16);
});
});

describe( '#greet', function() {

it('should be a function', function() {
(typeof greet).should.equal('function');
});

it( 'should print a greeting', function() {
var name = 'Dev League';
greet( name );
Expand All @@ -61,6 +47,14 @@ describe( 'Main', function() {
});
});

describe('canDrive', function() {
it ('should be true if `person` is atleast 16 years old', function() {
expect(canDrive).to.exist;
(typeof canDrive).should.equal('function');
canDrive().should.equal(person.age >= 16);
});
});

describe('dataTypes', function() {
it('should be an array', function() {
expect(dataTypes).to.exist;
Expand All @@ -85,12 +79,6 @@ describe( 'Main', function() {
});

describe( 'dog object literal', function() {
// var spot = new Dog('Spot');
// it('should be a function', function() {
// (typeof Dog).should.equal('object');
// expect(Dog).to.exist;
// });

it('should be an object', function() {
dog.should.be.an('object');
expect(dog).to.exist;
Expand Down