0.0.4 • Published 4 years ago

@nosaid/jest v0.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

@nosaid/jest

集成了 typescript 的单元测试相关包。

Installation

npm install @nosaid/jest --save-dev

Usage

& vim jest.config.js
// eslint-disable-next-line
module.exports = {
    moduleNameMapper: {
        '^@/(.*)$': '<rootDir>/$1',
        '^vue$': 'vue/dist/vue.common.js',
        '^~/(.*)$': '<rootDir>/client/$1'
    },
    moduleFileExtensions: ['ts', 'js', 'vue', 'json'],
    transform: {
        '^.+\\.js$': 'babel-jest',
        '.*\\.(vue)$': 'vue-jest',
        '^.+\\.tsx?$': 'ts-jest'
    },
    collectCoverage: true,
    collectCoverageFrom: ['<rootDir>/client/components/**/*.vue', '<rootDir>/client/pages/**/*.vue']
};
& vim package.json
{
    "scripts": {
        ...,
        "test": "jest"
    }
}
0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago