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

Commit 04e74b8

Browse files
committed
renaming test file
1 parent 0935557 commit 04e74b8

2 files changed

Lines changed: 27 additions & 4 deletions

File tree

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ addons:
1010
- libstdc++-4.9-dev
1111
before_script:
1212
- npm install
13-
- npm install codeclimate-test-reporter istanbul -g
13+
- npm install codeclimate-test-reporter codacy-coverage istanbul -g
1414
script:
1515
- istanbul cover "./node_modules/mocha/bin/_mocha" --report lcovonly --print detail -- --recursive --reporter spec
1616
after_success:
17-
- codeclimate-test-reporter < ./coverage/lcov.info
17+
- codeclimate-test-reporter < ./coverage/lcov.info
18+
- codacy-coverage < ./coverage/lcov.info
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
var should = require ( 'chai' ).should ();
22
var expect = require ( 'chai' ).expect;
3+
var rewire = require( 'rewire' );
34
describe ( 'worker/stat.js', function ( ) {
45
it ( 'should have a idrinth variable in scope', function ( ) {
5-
var idrinth = require( 'rewire' ) ( "../../src/workers/stats" ).__get__( 'idrinth' );
6+
var idrinth = rewire ( "../../src/workers/stats" ).__get__( 'idrinth' );
67
should.exist ( idrinth );
78
idrinth.should.be.an ( 'object' );
89
describe ( 'idrinth', function ( ) {
@@ -34,6 +35,13 @@ describe ( 'worker/stat.js', function ( ) {
3435
describe ( 'idrinth.MultiplierSet', function ( ) {
3536
it ( 'MultiplierSet should be a function', function ( ) {
3637
idrinth.MultiplierSet.should.be.a( 'function' );
38+
describe ( 'idrinth.MultiplierSet#Instance', function ( ) {
39+
var multiplier = new idrinth.MultiplierSet( );
40+
it ( 'MultiplierSet should return an object', function ( ) {
41+
should.exist( multiplier );
42+
multiplier.should.be.an( 'object' );
43+
} );
44+
} );
3745
} );
3846
} );
3947
} );
@@ -42,14 +50,28 @@ describe ( 'worker/stat.js', function ( ) {
4250
describe ( 'idrinth.StatSet', function ( ) {
4351
it ( 'StatSet should be a function', function ( ) {
4452
idrinth.StatSet.should.be.a( 'function' );
53+
describe ( 'idrinth.StatSet#Instance', function ( ) {
54+
var stat = new idrinth.StatSet( );
55+
it ( 'StatSet should return an object', function ( ) {
56+
should.exist( stat );
57+
stat.should.be.an( 'object' );
58+
} );
59+
} );
4560
} );
4661
} );
4762
} );
4863
it ( 'should have a Calculator property', function ( ) {
4964
expect( idrinth ).to.have.property( 'Calculator' );
5065
describe ( 'idrinth.Calculator', function ( ) {
5166
it ( 'Calculator should be a function', function ( ) {
52-
idrinth.Calculator.should.be.a( 'function' );
67+
idrinth.Calculator.should.be.a( 'function' );
68+
describe ( 'idrinth.Calculator#Instance', function ( ) {
69+
var calculator = new idrinth.Calculator( );
70+
it ( 'Calculator should return an object', function ( ) {
71+
should.exist( calculator );
72+
calculator.should.be.an( 'object' );
73+
} );
74+
} );
5375
} );
5476
} );
5577
} );

0 commit comments

Comments
 (0)