Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invent convenient types for referencing ReporterOptions' nested properties #40

Open
noomorph opened this issue May 20, 2024 · 0 comments

Comments

@noomorph
Copy link
Collaborator

Currently, it's hard to type separately options.testCase.description , etc.

I have to use clumsy constructs like:

import type {
  TestCaseCustomizer,
  TestCaseExtractorContext,
  TestFileExtractorContext,
  TestRunExtractorContext,
} from 'jest-allure2-reporter';

type TestCaseLikeContext =
  | TestCaseExtractorContext
  | TestFileExtractorContext
  | TestRunExtractorContext;

export const descriptionHtml: TestCaseCustomizer<TestCaseLikeContext>['descriptionHtml'] =
  async ({ $, result }) => {
    return $.markdown2html(result.description);
  };

Isn't that too much? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant