@swan-io/vitest-notion-reporter
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

vitest-notion-reporter

Eager to make your unit tests a source of documentation for everyone in your company? Here comes a vitest reporter that creates documentation on Notion from your tests describes and its 🚀

Prerequisites

You will need to setup an integration in your Notion able to write on the root page you'll have for documentation.

Installation

npm install -D @swan-io/vitest-notion-reporter

Usage

Add the reporter to your vitest configuration

import { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";

export default defineConfig(<UserWorkspaceConfig>{
  test: {
    reporters: [new NotionReporter()],
  },
});

Configuration

export NOTION_TOKEN=<YOUR-NOTION-TOKEN>
export NOTION_PARENT_PAGE_ID=<ROOT-PAGE-FOR-DOCUMENTATION-ID>

or

import { defineConfig, UserWorkspaceConfig } from "vitest/config";
import { NotionReporter } from "@swan-io/vitest-notion-reporter";

export default defineConfig(<UserWorkspaceConfig>{
  test: {
    reporters: [
      new NotionReporter({
        token: "<YOUR-NOTION-TOKEN>",
        parentPageId: "<ROOT-PAGE-FOR-DOCUMENTATION-ID>",
      }),
    ],
  },
});

Links

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i @swan-io/vitest-notion-reporter

    Weekly Downloads

    1

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    18.3 kB

    Total Files

    18

    Last publish

    Collaborators

    • swan-io