Have ideas to improve npm?Join in the discussion! »

    performance-testing-cli
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.1 • Public • Published

    performance-testing-cli

    npm codecov GitHub Workflow Status GitHub Workflow Status License: MIT

    If you use renderTime, you can get benefit by using this lib with react-performance-testing. This lib is created to improve DX for react-performance-test users. You can execute all test at once by using this library.

    Table of Contents

    Installation

    npm:

    npm install --save-dev performance-testing-cli

    yarn:

    yarn add --dev performance-testing-cli

    Usage

    You can test render time at once. But you should write one test case in one file. Because node.js has feature called inline caching. Inline caching is make our code be fast but we can not measure render time correctly.
    But this library resolve this problem by executing test in another process.

    You can use as below.

    perf --cmd='jest' --root='dir'

    Note: You need to separate directory to generally test and renderTime test.

    You can check example here.

    Options

    • cmd(required) ... Specify your test command like jest, mocha.

    • root(required) ... Specify your root directory you want to test performance.

    • match ... Specify your regexp. Using micromatch. default: **/*.(test|spec).(j|t)s(x)?.

    • If you specify file path as below, you can test one by one.

    perf --cmd='jest' ./dir/filename.js

    Even if you specify root option, filename.js has priority.

    perf --cmd='jest' --root='rootDir' ./dir/filename.js

    LICENSE

    MIT

    Install

    npm i performance-testing-cli

    DownloadsWeekly Downloads

    72

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    20.5 kB

    Total Files

    41

    Last publish

    Collaborators

    • avatar