0.10.0 • Published 9 months ago

@procore/hammer-test-vitest v0.10.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
9 months ago

@procore/hammer-vitest-test

A vitestvitest based test plugin for @procore/hammer test CLI.

Quick Start

Install @procore/hammer and @procore/hammer-test-vitest.

yarn add -D @procore/hammer
yarn add -D @procore/hammer-test-vitest

Run @procore/hammer test

yarn @procore/hammer test

CLI Options

The plugin supports @procore/hammer CLI options, such as:

  • --watch
  • --coverage
  • --silent
  • --ci (forces Watch mode off, Coverage mode on)

Defaults

The plugin does provide a basic reasonable Vitest configuration.

  • The plugin detects a desired environment based on package's dependencies. For React-based projects it shall set jsdom environment, and node environment for others

  • 'src/**/vitest.setup.{ts,js,cjs,mjs}' files will be automatically picked up and used as setup files

Overrides

There are two main ways of overriding the plugin configuration: partial and full.

Partial Override

To partially override the config, hammer configuration file can be used:

// hammer.config.ts
export default {
  testVitest(config) {
    config.setupFiles = ["src/my-vitest-setup.js"];
    return config;
  }
};

Development

This project uses yarn, and supports the following commands:

  • build: builds and bundles the project.
  • clean: deletes the output directory and any built files.
  • format: runs prettier on the project.
  • format:check: uses prettier to validate code format.
  • lint:code: uses eslint to lint code.
  • lint:types: uses TypeScript to validate types.
  • test: runs the unit test suite.
  • test:ci: run the unit test suite, reporting coverage.
0.10.0

9 months ago

0.9.0

11 months ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago