@poi/plugin-karma
Automatic (headless) browser testing with [Karma](https://karma-runner.github.io/latest/index.html).
Last updated a month ago by egoist .
Original npm · Tarball · package.json
$ cnpm install @poi/plugin-karma 
SYNC missed versions from official npm registry.

@poi/plugin-karma

Automatic (headless) browser testing with Karma.

Introduction

This plugin pre-configures Karma, Jasmine for you so that you can run the tests without any configurations.

Install

yarn add @poi/plugin-karma --dev

How to use

In your poi.config.js:

module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-karma'
    }
  ]
}

This plugin injected a new command to Poi CLI: poi test:unit which is a command running in Poi's test mode.

To run it easier, you can configure this in npm scripts:

{
  "name": "my-project",
  "scripts": {
    "test": "poi test:unit",
    "build": "poi --prod",
    "start": "poi --serve"
  },
  "devDependencies": {
    "poi": "^12.0.0"
  }
}

Now you can run npm test instead.

Test File Patterns

By default this plugin use **/*.{test,spec}.{js,ts} (excluded node_modules) as test files, you can change this to any minimatch pattern (note the quotes to avoid shell expansion):

poi test:unit "**/*.spec.coffee"

Coverage Report

Use --coverage flag to show code coverage and generate coverage report to ./coverage folder.

Watching Files

Use --watch flag to watch test files.

Running on CI

To run your tests in Continuous Integration Platforms like CircleCI, you will need Chrome installed in your test environment.

Current Tags

  • 13.0.3-canary.585.f015dbf.0                                ...           canary (a year ago)
  • 12.0.0-alpha.2                                ...           future (2 years ago)
  • 13.0.4                                ...           latest (a month ago)
  • 12.0.0-beta.1                                ...           next (2 years ago)

33 Versions

  • 13.0.4                                ...           a month ago
  • 13.0.3                                ...           10 months ago
  • 13.0.3-canary.585.f015dbf.0                                ...           a year ago
  • 13.0.2                                ...           a year ago
  • 13.0.1                                ...           a year ago
  • 13.0.0                                ...           a year ago
  • 12.0.3                                ...           a year ago
  • 12.0.2                                ...           a year ago
  • 12.0.1                                ...           a year ago
  • 12.0.0                                ...           a year ago
  • 12.0.0-beta.1                                ...           2 years ago
  • 12.0.0-beta.0                                ...           2 years ago
  • 12.0.0-alpha.7                                ...           2 years ago
  • 12.0.0-alpha.6                                ...           2 years ago
  • 12.0.0-alpha.5                                ...           2 years ago
  • 12.0.0-alpha.4                                ...           2 years ago
  • 12.0.0-alpha.3                                ...           2 years ago
  • 12.0.0-alpha.2                                ...           2 years ago
  • 10.0.3                                ...           2 years ago
  • 10.0.2                                ...           2 years ago
  • 10.0.1                                ...           2 years ago
  • 10.0.0                                ...           2 years ago
  • 10.0.0-rc.4                                ...           2 years ago
  • 10.0.0-rc.3                                ...           2 years ago
  • 10.0.0-rc.2                                ...           2 years ago
  • 10.0.0-rc.1                                ...           2 years ago
  • 10.0.0-rc.0                                ...           2 years ago
  • 10.0.0-beta.10                                ...           2 years ago
  • 10.0.0-beta.9                                ...           2 years ago
  • 10.0.0-beta.8                                ...           2 years ago
  • 10.0.0-beta.7                                ...           2 years ago
  • 10.0.0-beta.2                                ...           2 years ago
  • 10.0.0-beta.1.0                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 10
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |