loading-spinner
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "loading-spinner", | ||
"main": "./lib/loading-spinner", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Loading spinner for NodeJS.", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -1,48 +0,45 @@ | ||
var loadingSpinner = require('../lib/loading-spinner'); | ||
var assert = require('assert'); | ||
var dary = function() { | ||
loadingSpinner.stop(); | ||
process.stdout.write('DA-RY !'); | ||
}; | ||
var legend = function() { | ||
function test(done, options, sequence) { | ||
process.stdout.write('It\'s gonna be LE-GEN... Wait for it... '); | ||
loadingSpinner.start(100, { | ||
clearChar: true | ||
}); | ||
setTimeout(dary, 1000); | ||
}; | ||
legend(); | ||
var loadingSpinner = require('../lib/loading-spinner'); | ||
/*function test1() { | ||
loadingSpinner.start(); | ||
setTimeout(function() { | ||
loadingSpinner.stop(); | ||
test2(); | ||
}, 1000); | ||
} | ||
if (sequence) { | ||
loadingSpinner.setSequence(sequence); | ||
} | ||
function test2() { | ||
loadingSpinner.changeSequence(['0o0', 'o0o']); | ||
loadingSpinner.start(); | ||
if (options) { | ||
loadingSpinner.start(100, { | ||
clearChar: true | ||
}); | ||
} else { | ||
loadingSpinner.start(100); | ||
} | ||
setTimeout(function() { | ||
loadingSpinner.stop(); | ||
test3(); | ||
}, 1000); | ||
} | ||
process.stdout.write('DA-RY !'); | ||
function test3() { | ||
loadingSpinner.start(50,{ hideCursor : true }); | ||
setTimeout(function() { | ||
loadingSpinner.stop(); | ||
loadingSpinner.start(100, { doNotBlock : true }); | ||
done(); | ||
}, 1000); | ||
} | ||
process.on('exit', function() { | ||
loadingSpinner.stop(); | ||
console.log('Have a nice day'); | ||
describe('LE-GEN-DA-RY', function() { | ||
describe('WITHOUT option', function () { | ||
it('SHOULD load without error', function(done) { test(done); }); | ||
}); | ||
describe('WITH option(s)', function () { | ||
it('clearChar: false', function(done) { test(done, { clearChar: false }); }); | ||
it('clearChar: true', function(done) { test(done, { clearChar: true }); }); | ||
it('clearLine: false', function(done) { test(done, { clearLine: false }); }); | ||
it('clearLine: true', function(done) { test(done, { clearLine: true }); }); | ||
it('doNotBlock: false', function(done) { test(done, { doNotBlock: false }); }); | ||
it('doNotBlock: true', function(done) { test(done, { doNotBlock: true }); }); | ||
it('hideCursor: false', function(done) { test(done, { hideCursor: false }); }); | ||
it('hideCursor: true', function(done) { test(done, { hideCursor: true }); }); | ||
}); | ||
describe('WITH pattern', function () { | ||
it('012345678987654321', function(done) { test(done, null, ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '8', '7', '6', '5', '4', '3', '2', '1']); }); | ||
}); | ||
}); | ||
test1();*/ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7258
93