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

feat(reporters): jest html reporter #633

Merged
merged 14 commits into from
Jan 31, 2025

Conversation

mordvinx
Copy link
Contributor

Add custom reporter for Jest.

How to use:

const config = {
    reporters: [
        'html-reporter/build/jest.js'
    ],
};

Copy link
Member

@shadowusr shadowusr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR супер! 🔥 Круто, что получилось быстро поддержать jest и расширить возможности html-reporter!

В целом PR почти готов, есть ряд минорных замечаний.

Из критичного:

  • Нужна дока с примерами, как подключить, как использовать, как менять настройки в конфиге, как смотреть отчет, т.е. базовые сценарии
  • В идеале тесты в директории e2e, но это уже как по времени будет получаться, не обязательно
  • Ряд опечаток/случайных ошибок в коде

lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Show resolved Hide resolved
lib/adapters/test-result/jest.ts Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
lib/adapters/test-result/jest.ts Outdated Show resolved Hide resolved
@mordvinx mordvinx changed the title Users/mordvinx/testplane 430.jest html reporter Add custom jest reporter Jan 31, 2025
@mordvinx mordvinx changed the title Add custom jest reporter feat(reporters): jest html reporter Jan 31, 2025
Copy link
Member

@shadowusr shadowusr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Критичных замечаний нет, всё супер!

In our case, there are no special differences, but for convenience, all the necessary information is provided below.

## Minimal configuration
To connect the reporter, just go to jest.config.specify in the js file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает шага с установкой (хотя он и очевидный, но думаю не помешает)


After the report is generated, it must be distributed from the local server.

This requires the serve library, a package for quick and easy maintenance of static files. It allows you to turn the current working directory into a virtual server where you can open HTML, CSS, JavaScript files and other static assets in the browser.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю, не стоит писать, что serve — требование (requires). Просто написать, что нужен любой какой-нибудь сервер, например, serve. Ну и заодно уточнить, что если отчет выложен допустим на S3, то ничего не надо

@mordvinx mordvinx merged commit 9b3e78e into master Jan 31, 2025
4 checks passed
@mordvinx mordvinx deleted the users/mordvinx/TESTPLANE-430.jest-html-reporter branch January 31, 2025 14:31
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

Successfully merging this pull request may close these issues.

2 participants