open-index/open-npm huggingface dataset:
npm package: @poi/plugin-karma
Description: Automatic (headless) browser testing with [Karma](https://karma-runner.github.io/latest/index.html).
Latest version: 13.0.4

# @poi/plugin-karma

Automatic (headless) browser testing with [Karma](https://karma-runner.github.io/latest/index.html).

## Introduction

This plugin pre-configures [Karma](https://karma-runner.github.io/), [Jasmine](https://jasmine.github.io/) for you so that you can run the tests without any configurations.

## Install

```bash
yarn add @poi/plugin-karma --dev
```

## How to use

In your `poi.config.js`:

```js
module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-karma'
    }
  ]
}
```

This plugin injected a new command to Poi CLI: `poi test:unit` which is a command running in Poi's `test` mode.

To run it easier, you can configure this in npm scripts:

```json
{
  "name": "my-project",
  "scripts": {
    "test": "poi test:unit",
    "build": "poi --prod",
    "start": "poi --serve"
  },
  "devDependencies": {
    "poi": "^12.0.0"
  }
}
```

Now you can run `npm test` instead.

### Test File Patterns

By default this plugin use `**/*.{test,spec}.{js,ts}` (excluded `node_modules`) as test files, you can change this to any minimatch pattern (note the quotes to avoid shell expansion):

```bash
poi test:unit "**/*.spec.coffee"
```

### Coverage Report

Use `--coverage` flag to show code coverage and generate coverage report to `./coverage` folder.

### Watching Files

Use `--watch` flag to watch test files.

### Running on CI

To run your tests in Continuous Integration Platforms like CircleCI, you will need `Chrome` installed in your test environment.
npm package: @poi/plugin-puppet
Description: Easy automatic (headless) browser testing, powered by [Puppeteer](https://github.com/GoogleChrome/puppeteer).
Latest version: 0.1.6

# @poi/plugin-puppet ![status beta](https://badgen.net/badge/status/beta/pink)

Easy automatic (headless) browser testing, powered by [Puppeteer](https://github.com/GoogleChrome/puppeteer).

<img src="https://unpkg.com/@egoist/media/projects/poi/puppet.svg" width="500" alt="preview">

## Install

```bash
yarn add @poi/plugin-puppet --dev
```

<sup><small>*Require Poi 12.0.2 and above.*</small></sup>

## How to use

Add this plugin in `poi.config.js`:

```js
module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-puppet'
    }
  ]
}
```

Now you can bundle your code and run it in browser:

```js
// cowsay.js
import * as cowsay from 'cowsay'

// You can use window.*, since this will be run in Chromium
const text = window.atob('SSBydW4gaW4gYSBicm93c2Vy')

// Everything logged here will be piped to your host terminal
console.log(cowsay.say({ text }))

// Explicitly terminate the script when you are done
puppet.exit()
```

This command will inject`puppet` command to the Poi CLI, you need to use this command in `--test` mode:

```bash
❯ poi puppet --test cowsay.js
 ____________________
< I run in a browser >
 --------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
✔ All tests have passed!
```

### Testing Frameworks

This plugin also works with some popular testing frameworks like [Mocha](https://mochajs.org/) and [Tape](https://github.com/substack/tape), check out the CLI usages.

## CLI Usages

### `poi puppet --test [...files]`

#### `[...files]`

- Type: `string[]`
- Default: `**/*.test.{js,ts}`

One or more glob patterns for matching test files. `node_modules` is always excluded.

#### `--no-headless`

Don't run Chromium in headless mode.

#### `--framework <framework>`

- Type: `string`
- Values: `mocha` `tape`

Use a testing framework.

For **Mocha**: you don't need addtional dependencies, `window.mocha` is available in your code. [Here's the code example.](https://github.com/egoist/poi/blob/master/plugins/puppet/example/mocha.test.js)<br>
For **Tape**: you need to install `tape` in your project since you need to import it in your code. [Here's the code example.](https://github.com/egoist/poi/blob/master/plugins/puppet/example/tape.test.js)

#### `--ui <ui>`

- Type: `string`
- Values: `bdd` `tdd` `qunit`
- Default: `bdd`

Set user-interface for mocha.

## Caveats

This is just for unit testing (maybe for now).

## Credits

This plugin is inspired by [puppet-run](https://github.com/andywer/puppet-run) which is built upon Parcel bundler.
npm package: @poi/plugin-reason
Description: Use [Reason](https://reasonml.github.io/en/) with Poi.
Latest version: 12.1.0
Deprecated: Install @poi/bs-loader in your Poi project instead of using this plugin!

# @poi/plugin-reason

Use [Reason](https://reasonml.github.io/en/) with Poi.

## Install

```bash
yarn add @poi/plugin-reason bs-platform --dev
```

## How to use

Add this plugin in your `poi.config.js`:

```js
module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-reason'
    }
  ]
}
```

Now you can import `.re` and `.ml` files.