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(jest): mithril component testing #3679

Merged
merged 7 commits into from
Feb 10, 2023
Merged

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Nov 13, 2022

Changes proposed in this pull request:
This is part two of adding jest testing. It makes the necessary changes to be able to test component behavior.

Reviewers should focus on:
Part one is here: #3678

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

Required changes:

  • Related documentation PR: (Remove if irrelevant)
  • Related core extension PRs: (Remove if irrelevant)

@SychO9 SychO9 force-pushed the sm/jest-unit-tests branch from 7783ea2 to f043035 Compare November 13, 2022 14:39
@SychO9 SychO9 force-pushed the sm/jest-component-testing branch from baf54c3 to c229fa6 Compare November 13, 2022 14:40
@SychO9 SychO9 marked this pull request as ready for review November 13, 2022 19:07
@SychO9 SychO9 requested a review from a team as a code owner November 13, 2022 19:07
@SychO9 SychO9 self-assigned this Nov 15, 2022
Copy link
Member

@askvortsov1 askvortsov1 left a comment

Choose a reason for hiding this comment

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

This is awesome!!!

js-packages/jest-config/test-matchers.ts Show resolved Hide resolved
@askvortsov1
Copy link
Member

askvortsov1 commented Jan 17, 2023

Is testing supported in CI? I'm not seeing corresponding jobs in https://github.com/flarum/framework/actions/runs/3456520912/jobs/5769312494

@SychO9
Copy link
Member Author

SychO9 commented Jan 17, 2023

Is testing supported in CI? I'm not seeing corresponding jobs in https://github.com/flarum/framework/actions/runs/3456520912/jobs/5769312494

We can look into it after it's merged (flarum/action-build#12) I don't remember if I tested the CI changes or not.

Base automatically changed from sm/jest-unit-tests to main February 8, 2023 21:02
# Conflicts:
#	js-packages/jest-config/README.md
#	js-packages/jest-config/package.json
#	js-packages/jest-config/setup-env.js
#	yarn.lock
@SychO9 SychO9 added this to the 1.7 milestone Feb 10, 2023
@SychO9 SychO9 merged commit 7e6458a into main Feb 10, 2023
@SychO9 SychO9 deleted the sm/jest-component-testing branch February 10, 2023 22:02
@SychO9 SychO9 added the javascript Pull requests that update Javascript code label Feb 11, 2023
@luceos luceos mentioned this pull request Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code prio/high type/feature type/infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants