Rocket.Chat.Apps-engine
Rocket.Chat.Apps-engine copied to clipboard
Migrate testing framework to jest and add more tests
I was thinking to migrate our testing framework from alsation to jest for the following considerations:
Reliability. Compared to alsation, jest is an actively developed and maintained open-source project led by facebook, which has already gained a lot of attention from the community. The former is a personal open-source project mainly maintained by @ jamesadarich, which is at risk of no longer maintaining.
Ecosystem Jest has a stronger community, which means we will benefit from abundant tools contributed by the community. For instance, vscode-jest would bring us seamless VSCode integration; babel-jest can give jest the ability to support TypeScript (now it has been merged into jest's main repository). Because of the stronger community, It's much easier for us to find solutions from the community's discussions when meeting the bugs.
Easy Migration We can do this migration without too much pain.
Codecov Report
Merging #180 (303ca67) into beta-external-component (a34d69c) will decrease coverage by
12.54%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## beta-external-component #180 +/- ##
============================================================
- Coverage 55.49% 42.94% -12.55%
============================================================
Files 68 66 -2
Lines 2402 2191 -211
Branches 360 356 -4
============================================================
- Hits 1333 941 -392
- Misses 1069 1250 +181
Impacted Files | Coverage Δ | |
---|---|---|
src/server/ProxiedApp.ts | 2.89% <ø> (-11.21%) |
:arrow_down: |
src/server/compiler/AppCompiler.ts | 19.87% <ø> (-6.17%) |
:arrow_down: |
src/server/compiler/AppPackageParser.ts | 14.08% <ø> (-7.72%) |
:arrow_down: |
src/server/errors/RequiredApiVersionError.ts | 0.00% <ø> (-100.00%) |
:arrow_down: |
src/server/logging/AppConsole.ts | 100.00% <ø> (+1.96%) |
:arrow_up: |
src/server/misc/Utilities.ts | 35.29% <ø> (-13.55%) |
:arrow_down: |
src/server/misc/DisabledApp.ts | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
src/server/managers/AppSlashCommandManager.ts | 4.48% <0.00%> (-94.90%) |
:arrow_down: |
src/server/managers/AppSlashCommand.ts | 32.25% <0.00%> (-64.72%) |
:arrow_down: |
... and 64 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a34d69c...303ca67. Read the comment docs.
Hey @lolimay ! Could you edit the description to add some of the reasons for the migration (e.g. benefits of Jest vs Alsatian)? Thanks :D
Hey @lolimay ! Could you edit the description to add some of the reasons for the migration (e.g. benefits of Jest vs Alsatian)? Thanks :D
Added :)