Sha256: 6dc1ca9e8d9a39f07300e45f3ba5be166e498ade2af6de198fd7d0d82ed13fb3
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
'use strict'; /** * Module dependencies. */ var Runnable = require('./runnable'); var create = require('lodash.create'); var isString = require('./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`. */ Test.prototype = create(Runnable.prototype, { constructor: Test }); 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; };
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stylus-source-0.54.5 | vendor/node_modules/mocha/lib/test.js |