Enhacements in gruntfile
This commit is contained in:
parent
38e93bb341
commit
c41446b131
29
Gruntfile.js
29
Gruntfile.js
|
@ -1,6 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
|
||||
//Load NPM tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-mocha-test');
|
||||
grunt.loadNpmTasks('grunt-nodemon');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
grunt.loadNpmTasks('grunt-env');
|
||||
|
||||
// Project Configuration
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
@ -29,6 +39,11 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
livereload: true
|
||||
}
|
||||
},
|
||||
test: {
|
||||
// we monitor only app/models/* because we have test for models only now
|
||||
files: ['test/**/*.js', 'test/*.js','app/models/*.js'],
|
||||
tasks: ['test'],
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
|
@ -43,7 +58,7 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
reporter: 'spec',
|
||||
},
|
||||
src: ['test/*.js']
|
||||
src: ['test/**/*.js'],
|
||||
},
|
||||
|
||||
nodemon: {
|
||||
|
@ -51,9 +66,9 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
file: 'server.js',
|
||||
args: [],
|
||||
ignoredFiles: ['public/**'],
|
||||
ignoredFiles: ['public/**', 'test/**'],
|
||||
watchedExtensions: ['js'],
|
||||
nodeArgs: ['--debug'],
|
||||
// nodeArgs: ['--debug'],
|
||||
delayTime: 1,
|
||||
env: {
|
||||
PORT: 3000
|
||||
|
@ -75,14 +90,6 @@ module.exports = function(grunt) {
|
|||
}
|
||||
});
|
||||
|
||||
//Load NPM tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-mocha-test');
|
||||
grunt.loadNpmTasks('grunt-nodemon');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
grunt.loadNpmTasks('grunt-env');
|
||||
|
||||
//Making grunt default to force in order not to break the project.
|
||||
grunt.option('force', true);
|
||||
|
||||
|
|
|
@ -181,7 +181,6 @@ TransactionSchema.methods.queryInfo = function (next) {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
tx.outs.forEach( function(i) {
|
||||
var n = util.valueToBigInt(i.v).toNumber();
|
||||
valueOut = valueOut.add(n);
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
db: "mongodb://localhost/mystery-test",
|
||||
port: 3001,
|
||||
db: "mongodb://localhost/mystery-dev",
|
||||
app: {
|
||||
name: "Mystery - Test"
|
||||
}
|
||||
}
|
||||
},
|
||||
bitcoind: {
|
||||
user: 'mystery',
|
||||
pass: 'real_mystery',
|
||||
protocol: 'http',
|
||||
host: process.env.BITCOIND_HOST || '127.0.0.1',
|
||||
port: process.env.BITCOIND_PORT || '8332',
|
||||
},
|
||||
network: 'testnet',
|
||||
}
|
||||
|
|
|
@ -26,10 +26,9 @@ describe('Block fromHashWithInfo', function(){
|
|||
done();
|
||||
});
|
||||
|
||||
|
||||
it('should poll block\'s info from mongoose', function(done) {
|
||||
console.log('asdasd');
|
||||
var block2 = Block.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
||||
console.log('333');
|
||||
if (err) done(err);
|
||||
|
||||
assert.equal(b2.hash, TESTING_BLOCK);
|
||||
|
@ -37,6 +36,7 @@ console.log('333');
|
|||
});
|
||||
});
|
||||
|
||||
|
||||
it('should poll block\'s info from bitcoind', function(done) {
|
||||
var block2 = Block.fromHashWithInfo(TESTING_BLOCK, function(err, b2) {
|
||||
if (err) done(err);
|
||||
|
|
Loading…
Reference in New Issue