open-index/open-npm huggingface dataset:
npm package: @systemfsoftware/trigger.dev_testing
Description: A collection of useful tools to write tests for Trigger.dev.
Latest version: 2.3.25

# Trigger.dev Testing Package

The testing package provides useful helpers to write your own tests in jest and vitest with complete type support.

## Usage

1. Install the package:

```bash
# npm
npm install -D @systemfsoftware/trigger.dev_testing

# yarn
yarn add -D @systemfsoftware/trigger.dev_testing

# pnpm
pnpm add -D @systemfsoftware/trigger.dev_testing
```

2. Import the package in a test as follows:

```js
import { toHaveSucceeded, createJobTester } from "@systemfsoftware/trigger.dev_testing";
import { expect, vi } from "vitest";

expect.extend({ toHaveSucceeded });
const testJob = createJobTester(vi);
```

3. You can then use it like this:

```js
const jobToTest = client.defineJob({
  id: "test-job",
  name: "Test Job",
  version: "0.1.0",
  trigger: eventTrigger({
    name: "test.trigger",
  }),
  integrations: {
    dummy,
  },
  run: async (payload, io, ctx) => {
    return await io.dummy.doSomething("test-task", {
      foo: payload.foo,
    });
  },
});

const testRun = await testJob(jobToTest, {
  payload: {
    foo: "bar",
  },
  tasks: {
    "test-task": {
      bar: "baz",
    },
  },
});

// job run was successful
expect(testRun).toHaveSucceeded();

// task was called exactly once
expect(testRun.tasks["test-task"]).toHaveBeenCalledOnce();

// task was called with correct params
expect(testRun.tasks["test-task"]).toHaveBeenCalledWith({ foo: "bar" });

// mocked task output was correctly returned
expect(testRun.tasks["test-task"]).toHaveReturnedWith({ bar: "baz" });

// job run has expected output
expect(testRun.output).toEqual({ bar: "baz" });
```

## More information

See the official [Trigger.dev Unit Testing Reference](https://github.com/triggerdotdev/trigger.dev/tree/main/references/unit-testing/) for a working setup with Vitest.

## License

MIT
npm package: @systemic-games/pixels-core-animation
Description: Base types for storing raw animation data before sending to a Pixels die.
Author: Systemic Games
Latest version: 1.3.0

# Pixels Core Animation

Base types for storing raw animation data before sending to a Pixels die.

Find the latest published version on [NPM](
  https://www.npmjs.com/package/@systemic-games/pixels-core-animation
).

## Foreword

If this is your first visit to the Pixels software documentation
you may want to head first to our documentation entry point [here](
    https://github.com/GameWithPixels
).

This package is using decorators (`experimentalDecorators` enabled in `tsconfig`)
to tag how class fields should be serialized.

## Module documentation

See the module's export documentation [here](
    https://gamewithpixels.github.io/pixels-js/modules/_systemic_games_pixels_core_animation.html
).

Documentation generated with [TypeDoc](https://typedoc.org/).

## Editing Animation Data

The [*@systemic-games/pixels-edit-animation*](
    ../pixels-edit-animation
) package is better suited for manipulating animation data.

## License

MIT

---

Made with [Example TypeScript Package](
    https://github.com/tomchen/example-typescript-package
).
npm package: @systemic-games/pixels-core-utils
Description: Core classes and functions used throughout the TypeScript Pixels packages.
Author: Systemic Games
Latest version: 1.3.0

# Pixels Core Utils

Core classes and functions used throughout the TypeScript Pixels packages.

Find the latest published version on [NPM](
  https://www.npmjs.com/package/@systemic-games/pixels-core-utils
).

## Foreword

If this is your first visit to the Pixels software documentation
you may want to head first to our documentation entry point [here](
    https://github.com/GameWithPixels
).

This package is using decorators (`experimentalDecorators` enabled in `tsconfig`)
and the `reflect-metadata` package for serialization using reflection.

## Module documentation

See the module's export documentation [here](
    https://gamewithpixels.github.io/pixels-js/modules/_systemic_games_pixels_core_utils.html
).

Documentation generated with [TypeDoc](https://typedoc.org/).

## License

MIT

---

Made with [Example TypeScript Package](
    https://github.com/tomchen/example-typescript-package
).
npm package: @systemic-games/pixels-react
Description: React hooks for Pixels.
Author: Systemic Games
Latest version: 1.3.0

# Pixels React

React hooks for Pixels.

Find the latest published version on [NPM](
  https://www.npmjs.com/package/@systemic-games/pixels-react
).

## Foreword

If this is your first visit to the Pixels software documentation
you may want to head first to our documentation entry point [here](
    https://github.com/GameWithPixels
).

This packages works with [*@systemic-games/pixels-web-connect*](
    ../pixels-web-connect
) and [*@systemic-games/react-native-pixels-connect*](
    ../react-native-pixels-connect
).

## Example

```ts
import { usePixelStatus, usePixelValue } from "@systemic-games/pixels-react";
import { Pixel } from "@systemic-games/pixels-web-connect";

function PixelRollResult({ pixel }: { pixel: Pixel }) {
  const status = usePixelStatus(pixel);
  const [rollResult] = usePixelValue(pixel, "roll");

  useEffect(() => {
    if (status === "ready") {
      // Log battery state
      console.log(
        `${pixel.name} => battery: ${pixel.batteryLevel}, isCharging: ${pixel.isCharging}`
      );
      // Log roll state
      console.log(
        `${pixel.name} => initial roll state: ${pixel.rollState}, face ${pixel.currentFace}`
      );
    }
  }, [pixel, status]);

  useEffect(() => {
    if (rollResult) {
      // We log the result of each roll just for demonstration purposes
      // but this where you would want to act on a roll result.
      console.log(`Pixel ${pixel.name} rolled a ${rollResult.face}`);
    }
  }, [rollResult, pixel]);

  return (
    <div>
      <text>
        Pixel {pixel.name} status: {status}
      </text>
      {!!rollResult && <text>Roll result: {rollResult.face}</text>}
    </div>
  );
};
```

## Module documentation

See the module's export documentation [here](
    https://gamewithpixels.github.io/pixels-js/modules/_systemic_games_pixels_react.html
).

Documentation generated with [TypeDoc](https://typedoc.org/).

## License

MIT

---

Made with [Example TypeScript Package](
    https://github.com/tomchen/example-typescript-package
).
npm package: @systemic-games/react-native-pixels-connect
Description: Connect to Pixels dice using React Native.
Author: Systemic Games
Latest version: 1.3.1

# React Native Pixels Connect

This is the Pixels package for React Native.
It enables communications between Pixels dice and a React Native app
using Bluetooth Low Energy.
It has support for iOS and Android.

Find the latest published version on [NPM](
  https://www.npmjs.com/package/@systemic-games/react-native-pixels-connect
).

## Foreword

Pixels are full of LEDs, smarts and no larger than regular dice, they can be
customized to light up when and how you desire.
Check our [website](https://gamewithpixels.com/) for more information.

> **Warning**
> Before jumping into programming please make sure to read our Pixels developer's
> [guide](https://github.com/GameWithPixels/.github/blob/main/doc/DevelopersGuide.md).

Please open a [ticket](
    https://github.com/GameWithPixels/pixels-js/issues
) on GitHub if you're having any issue.

## Installation

```sh
npm install @systemic-games/react-native-pixels-connect
```

## Usage

```js
import { PixelScanner, Pixel } from "@systemic-games/react-native-pixels-connect";

// ...
```

## React Hooks

See the [*@systemic-games/pixels-react*](../pixels-react) package.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)