UNPKG

base-test-suite

Version:
94 lines (59 loc) 5.18 kB
# base-test-suite [![NPM version](https://img.shields.io/npm/v/base-test-suite.svg?style=flat)](https://www.npmjs.com/package/base-test-suite) [![NPM monthly downloads](https://img.shields.io/npm/dm/base-test-suite.svg?style=flat)](https://npmjs.org/package/base-test-suite) [![NPM total downloads](https://img.shields.io/npm/dt/base-test-suite.svg?style=flat)](https://npmjs.org/package/base-test-suite) [![Linux Build Status](https://img.shields.io/travis/node-base/base-test-suite.svg?style=flat&label=Travis)](https://travis-ci.org/node-base/base-test-suite) > Test suite for base projects. ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save base-test-suite ``` ## Usage 1875 unit tests for and counting! This just returns an object of properties, with filepaths grouped around categories of tests (for now the tests are grouped by [application](#about). ```js var argv = require('yargs-parser')(process.argv.slice(2)); var runner = require('base-test-runner')(argv); var suite = require('base-test-suite'); runner.on('file', function(file) { // files return a function that expect a constructor // to be passed as the only argument require(file.path)(require('templates')); }); // run the `templates` test suite runner.addFiles(suite.test.templates); ``` To see the properties and paths available, just do `console.log(suite)`. ## About This test suite includes unit tests for [base](https://github.com/node-base/base), applications built on base, such as [assemble](https://github.com/assemble/assemble), [generate](https://github.com/generate/generate), [verb](https://github.com/verbose/verb) and [templates](https://github.com/jonschlinkert/templates), and plugins for these projects. These projects share a plugin system and conventions, it's only natural that they share a test suite. Going forward, the plan is to test all changes against this test suite before publishing, we encourage plugin authors to do the same. ## About ### Related projects * [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit") * [base](https://www.npmjs.com/package/base): base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… [more](https://github.com/node-base/base) | [homepage](https://github.com/node-base/base "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.") * [generate](https://www.npmjs.com/package/generate): Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the… [more](https://github.com/generate/generate) | [homepage](https://github.com/generate/generate "Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.") * [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb "Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.") ### Contributing Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). ### Contributors | **Commits** | **Contributor**<br/> | | --- | --- | | 26 | [jonschlinkert](https://github.com/jonschlinkert) | | 15 | [doowb](https://github.com/doowb) | ### Building docs _(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_ To generate the readme and API documentation with [verb](https://github.com/verbose/verb): ```sh $ npm install -g verb verb-generate-readme && verb ``` ### Running tests Install dev dependencies: ```sh $ npm install -d && npm test ``` ### Author **Jon Schlinkert** * [github/jonschlinkert](https://github.com/jonschlinkert) * [twitter/jonschlinkert](http://twitter.com/jonschlinkert) ### License Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT license](https://github.com/node-base/base-test-suite/blob/master/LICENSE). *** _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.2.0, on December 28, 2016._