rig-unit-test

A rig containing unit testing utilities

this package has been deprecated
Last updated 4 years ago by vladfilipro .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rig-unit-test 
SYNC missed versions from official npm registry.

rig-unit-test

Dependency Status

A rig containing tasks used for running unit tests

How to use

  1. Install rigs package: npm install rigs
  2. Install rig-unit-test: npm install rig-unit-test

Available tasks in rig-unit-test

  • rig-unit-test__karma: A task which runs Karma with the specific configuration (suitable for browser testing - frontend)

    • properties:

      • karma: Object, contains Karma configuration. More info on karma website
      {
          taskname: 'rig-unit-test__karma',
          dependency: [],
          karma: {
              basePath: './',
              frameworks: [ 'jasmine', 'browserify' ],
              preprocessors: {
                  '/spec/unit/**/*.js': [ 'browserify' ]
              },
              files: [
                  '/spec/unit/**/*.js'
              ],
              exclude: [],
              browserify: {
                  debug: true,
                  transform: [ 'browserify-ngannotate', require( 'browserify-istanbul' )( {
                      ignore: [
                          '**/node_modules/**',
                          '**/spec/**'
                      ]
                  } ) ]
              },
              reporters: [ 'progress', 'coverage' ],
              coverageReporter: {
                  reporters: [ {
                      type: 'text'
                  }, {
                      type: 'text-summary'
                  }, {
                      type: 'cobertura',
                      dir: './coverage/unit/'
                  }, {
                      type: 'html',
                      dir: './coverage/unit/'
                  } ]
              },
              port: 9876,
              colors: true,
              autoWatch: true,
              browsers: [ 'PhantomJS' ],
              singleRun: true
          }
      }
      
  • rig-unit-test__mocha: A task which runs Mocha with the specific configuration (suitable for nodejs testing - backend)

    • properties:

      • src: String or Array, refers to the source files for code coverage
      • tests: String or Array, refers to the source files of the unit tests
      • istanbul: Object, refers to istanbul configuration. See more at gulp-istanbul
      • mocha: Object, refers to mocha configuration. See more at gulp-mocha
      • reports: Object, refers to istanbul reporting configuration.
      {
          taskname: 'rig-unit-test__mocha',
          dependency: [],
          src: './src/**/*.js',
          tests: './spec/**/*.js',
          istanbul: { includeUntested: true },
          mocha: { reporter: 'nyan' },
          reports: {
              dir: './coverage',
              reporters: [ 'lcov' ],
              reportOpts: { dir: './coverage' }
          }
      }
      

Generated using webcase-rig version 1.0.0

Current Tags

  • 2.0.5                                ...           latest (4 years ago)

8 Versions

  • 2.0.5 [deprecated]           ...           4 years ago
  • 2.0.4 [deprecated]           ...           4 years ago
  • 2.0.3 [deprecated]           ...           4 years ago
  • 2.0.2 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           4 years ago
  • 2.0.0 [deprecated]           ...           4 years ago
  • 1.1.0 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 8
Dependencies (12)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |