Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
renaming test file
Browse files Browse the repository at this point in the history
  • Loading branch information
Idrinth committed May 31, 2018
1 parent 0935557 commit 04e74b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ addons:
- libstdc++-4.9-dev
before_script:
- npm install
- npm install codeclimate-test-reporter istanbul -g
- npm install codeclimate-test-reporter codacy-coverage istanbul -g
script:
- istanbul cover "./node_modules/mocha/bin/_mocha" --report lcovonly --print detail -- --recursive --reporter spec
after_success:
- codeclimate-test-reporter < ./coverage/lcov.info
- codeclimate-test-reporter < ./coverage/lcov.info
- codacy-coverage < ./coverage/lcov.info
26 changes: 24 additions & 2 deletions test/workers/stat.js → test/workers/stats.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
var should = require ( 'chai' ).should ();
var expect = require ( 'chai' ).expect;
var rewire = require( 'rewire' );
describe ( 'worker/stat.js', function ( ) {
it ( 'should have a idrinth variable in scope', function ( ) {
var idrinth = require( 'rewire' ) ( "../../src/workers/stats" ).__get__( 'idrinth' );
var idrinth = rewire ( "../../src/workers/stats" ).__get__( 'idrinth' );
should.exist ( idrinth );
idrinth.should.be.an ( 'object' );
describe ( 'idrinth', function ( ) {
Expand Down Expand Up @@ -34,6 +35,13 @@ describe ( 'worker/stat.js', function ( ) {
describe ( 'idrinth.MultiplierSet', function ( ) {
it ( 'MultiplierSet should be a function', function ( ) {
idrinth.MultiplierSet.should.be.a( 'function' );
describe ( 'idrinth.MultiplierSet#Instance', function ( ) {
var multiplier = new idrinth.MultiplierSet( );
it ( 'MultiplierSet should return an object', function ( ) {
should.exist( multiplier );
multiplier.should.be.an( 'object' );
} );
} );
} );
} );
} );
Expand All @@ -42,14 +50,28 @@ describe ( 'worker/stat.js', function ( ) {
describe ( 'idrinth.StatSet', function ( ) {
it ( 'StatSet should be a function', function ( ) {
idrinth.StatSet.should.be.a( 'function' );
describe ( 'idrinth.StatSet#Instance', function ( ) {
var stat = new idrinth.StatSet( );
it ( 'StatSet should return an object', function ( ) {
should.exist( stat );
stat.should.be.an( 'object' );
} );
} );
} );
} );
} );
it ( 'should have a Calculator property', function ( ) {
expect( idrinth ).to.have.property( 'Calculator' );
describe ( 'idrinth.Calculator', function ( ) {
it ( 'Calculator should be a function', function ( ) {
idrinth.Calculator.should.be.a( 'function' );
idrinth.Calculator.should.be.a( 'function' );
describe ( 'idrinth.Calculator#Instance', function ( ) {
var calculator = new idrinth.Calculator( );
it ( 'Calculator should return an object', function ( ) {
should.exist( calculator );
calculator.should.be.an( 'object' );
} );
} );
} );
} );
} );
Expand Down

0 comments on commit 04e74b8

Please sign in to comment.