blueflag-test
An oppinionated set of linting and testing tools
Last updated 9 months ago by dxinteractive .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install blueflag-test 
SYNC missed versions from official npm registry.

blueflag-test

Installation

yarn add --dev blueflag-test

package.json

{
    "scripts": {
        "flow": "blueflag-test flow",
        "flow-coverage": "blueflag-test flow-coverage",
        "lint": "blueflag-test lint",
        "test": "yarn jest",
        "test-all": "yarn lint && yarn flow && yarn test && yarn flow-coverage"
    }
}

jest.config.js

blueflag-test pre loads jest with support for [enzyme] with the jest-enzyme package. This loads enzyme-adapter-16 into each test file, gives you the shallow, mount and render globals, and extends expect with some handy enzyme matchers.

module.exports = {
    preset 'blueflag-test',
    ...config overrides
}

.flowconfig

You might need to shim some flow types

  1. If you are using immutable 3.8.x
  2. If you are testing with any enzyme globals
[libs]
./node_modules/blueflag-test/flow-typed-shims/immutable-3.8.x/
./node_modules/blueflag-test/flow-typed-shims/jest-enzyme-6.0.x/

[ignore]
<PROJECT_ROOT>/node_modules/immutable

Current Tags

  • 0.23.0                                ...           latest (9 months ago)

20 Versions

  • 0.23.0                                ...           9 months ago
  • 0.22.0                                ...           a year ago
  • 0.21.0                                ...           2 years ago
  • 0.20.0                                ...           2 years ago
  • 0.19.0                                ...           2 years ago
  • 0.18.1                                ...           2 years ago
  • 0.18.0                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.1                                ...           2 years ago
  • 0.16.0                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.3                                ...           2 years ago
  • 0.14.2                                ...           2 years ago
  • 0.14.1                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.3                                ...           2 years ago
  • 0.13.2                                ...           2 years ago
  • 0.13.1                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 14
Dependencies (24)
Dev Dependencies (0)
None
Dependents (3)

Copyright 2014 - 2016 © taobao.org |