Sun calculation js library which is fully based on formula from http://aa.quae.nl/en/reken/zonpositie.html
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.0 KiB
50 lines
1.0 KiB
'use strict';
|
|
|
|
/**
|
|
* Module dependencies.
|
|
*/
|
|
|
|
var Runnable = require('./runnable');
|
|
var utils = require('./utils');
|
|
var isString = utils.isString;
|
|
|
|
/**
|
|
* Expose `Test`.
|
|
*/
|
|
|
|
module.exports = Test;
|
|
|
|
/**
|
|
* Initialize a new `Test` with the given `title` and callback `fn`.
|
|
*
|
|
* @api private
|
|
* @param {String} title
|
|
* @param {Function} fn
|
|
*/
|
|
function Test (title, fn) {
|
|
if (!isString(title)) {
|
|
throw new Error('Test `title` should be a "string" but "' + typeof title + '" was given instead.');
|
|
}
|
|
Runnable.call(this, title, fn);
|
|
this.pending = !fn;
|
|
this.type = 'test';
|
|
}
|
|
|
|
/**
|
|
* Inherit from `Runnable.prototype`.
|
|
*/
|
|
utils.inherits(Test, Runnable);
|
|
|
|
Test.prototype.clone = function () {
|
|
var test = new Test(this.title, this.fn);
|
|
test.timeout(this.timeout());
|
|
test.slow(this.slow());
|
|
test.enableTimeouts(this.enableTimeouts());
|
|
test.retries(this.retries());
|
|
test.currentRetry(this.currentRetry());
|
|
test.globals(this.globals());
|
|
test.parent = this.parent;
|
|
test.file = this.file;
|
|
test.ctx = this.ctx;
|
|
return test;
|
|
};
|
|
|