Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egoist/testen
:heavy_check_mark: Run tests for multiple versions of Node.js in local env.
https://github.com/egoist/testen
circleci test travis
Last synced: about 1 month ago
JSON representation
:heavy_check_mark: Run tests for multiple versions of Node.js in local env.
- Host: GitHub
- URL: https://github.com/egoist/testen
- Owner: egoist
- License: mit
- Created: 2016-02-16T08:41:12.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T14:12:49.000Z (almost 3 years ago)
- Last Synced: 2024-10-23T02:17:02.818Z (about 2 months ago)
- Topics: circleci, test, travis
- Language: JavaScript
- Homepage:
- Size: 68.4 KB
- Stars: 175
- Watchers: 3
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-cn - testen - 使用 NVM 针对多个版本的 Node.js 运行本地测试 (包 / 测试)
- awesome-nodejs-cn - testen - **star:175** 使用NVM在本地运行Node.js的多个版本的测试 (包 / 测试)
- awesome-nodejs - testen - Run tests for multiple versions of Node.js locally with NVM. (Packages / Testing)
- awesome-node - testen - Run tests for multiple versions of Node.js locally with NVM. (Packages / Testing)
- awesome-nodejs-cn - testen - 使用NVM在本地运行针对多个版本的Node.js的测试. (目录 / 测试相关)
- awesome-nodejs - testen - Run tests for multiple versions of Node.js in local env. - ★ 163 (Testing)
README
👉 This project is now maintained over at [`bevry/testen`](https://github.com/bevry/testen) 👈
# testen [![NPM version](https://img.shields.io/npm/v/testen.svg)](https://npmjs.com/package/testen) [![NPM downloads](https://img.shields.io/npm/dm/testen.svg)](https://npmjs.com/package/testen)
[testen repo]: https://github.com/egoist/testen
Run tests for multiple versions of Node.js in local env.
![preview](https://ooo.0o0.ooo/2016/04/17/571460f682122.gif)
## Install
You should have `nvm` and `node >= 4` installed.
```bash
$ npm install -g testen
```## Usage
```bash
$ testen
```This will run `npm test` script, if `.travis.yml` or `circle.yml` exists, use node versions in it. Otherwise use [preset node versions](/lib/preset-versions.json).
Sometimes you wanna override these node versions, just pass `-n` to do this:
```bash
$ testen -n 0.10 -n 0.12# use system default node version
$ testen --system
```**Read Node.js versions from `package.json`**
```json
{
"testen": {
"node": ["0.12.0", "5", "4.2.4"]
}
}
```**Read test command from `package.json`**
```json
{
"testen": {
"test": "npm run test:custom"
}
}
```## CLI
```bash
$ testen --helpUsage:
--system: Use current node version
-n/--node [version]: Add a node version to test
-s, --sequence: Run tests in sequence
-- [command]: The test command you expect
-V/--verbose: Always output everything
~ example: there are `console.log` in test
```## License
MIT © [EGOIST](https://github.com/egoist)