Giter VIP home page Giter VIP logo

nx-uvu's Introduction

nx-uvu

An Nx executor for the uvu test runner!

Installation

Just your standard install.

npm i -D nx-uvu
pnpm i -D nx-uvu
yarn add --dev nx-uvu

Usage

Set your executor to nx-uvu:uvu like so:

{
  "project": {
    "root": "path/to/project",
    "type": "type",
    "sourceRoot": "path/to/project/src",
    "targets": {
      "test": {
        "executor": "nx-uvu:uvu",
        "options": {
          "rootDir": "./packages/styler/test",
          "coverage": true,
          "coverageConfig": "./packages/styler/.c8rc",
          "useSwc": true
        }
      }
    }
  }
}

And now nx run test project will use the uvu executor!

Options

There's some configuration options you can make use of with this executor to help really boost your tests speeds.

Option Type Default Required Description
rootDir string null true The root directory to run the uvu command from.
pattern string "(test|spec)\.(j|t)s" false The test pattern to pass to the uvu CLI
coverage boolean false false Whether or not c8 should be used to collect coverage. Keep this false if you'd rather use nyc or your own coverage collector
coverageConfig string null false The path to the c8 config file
typescript boolean true false If you'd like to use typescript files for your tests. This will automatically use ts-node
useSwc boolean false false Use SWC instead of ts-node and tsconfig-paths
tsconfigPaths boolean true false If tsconfig-paths should be registered. THis will only be registered if "typescript" is true and "useSwc" is false
color boolean true false If colors should be used with the test output

Contributing and Contacting

If I left something out, or we can make this better somehow, open an issue or a pull request! I'll be happy to take a look and see what we can do.

nx-uvu's People

Contributors

github-actions[bot] avatar jmcdo29 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nx-uvu's Issues

Update stats on the Nx Plugin Registry

The Github Stars are not showing up for nx-uvu on the Nx Plugin Registry.

To fix this, you need to add a repository.url in the package.json that points to this repo. i.e.

{
  "repository": {
    "type": "git",
    "url": "https://github.com/nrwl/nx.git",
    "directory": "packages/web"
  }
}

Thanks,
Isaac (Nx Team)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.