strapi icon indicating copy to clipboard operation
strapi copied to clipboard

Configure typescript tests

Open Bassel17 opened this issue 3 years ago • 2 comments

What does it do?

  • Configures jest to be able to run Typescript test files for the data-transfer package

Why is it needed?

  • we want to be able to run unit tests when we are working on the package, the package is a typescript package

How to test it?

create a typescript test file and add a test, and run the yarn test:unit the file would be run properly

Bassel17 avatar Oct 19 '22 09:10 Bassel17

Codecov Report

Base: 58.71% // Head: 62.45% // Increases project coverage by +3.73% :tada:

Coverage data is based on head (a41528f) compared to base (8978415). Patch coverage: 75.80% of modified lines in pull request are covered.

:exclamation: Current head a41528f differs from pull request most recent head b315b4f. Consider uploading reports for the commit b315b4f to get more accurate results

Additional details and impacted files
@@                Coverage Diff                 @@
##           features/deits   #14669      +/-   ##
==================================================
+ Coverage           58.71%   62.45%   +3.73%     
==================================================
  Files                1321     1043     -278     
  Lines               31976    22336    -9640     
  Branches             5954     3855    -2099     
==================================================
- Hits                18775    13950    -4825     
+ Misses              11341     7372    -3969     
+ Partials             1860     1014     -846     
Flag Coverage Δ
front 62.45% <75.80%> (+0.04%) :arrow_up:
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ges/core/admin/admin/src/core/apis/CustomFields.js 100.00% <ø> (ø)
packages/core/admin/admin/src/pages/App/index.js 68.96% <0.00%> (ø)
...MarketplacePage/components/NpmPackageCard/index.js 94.59% <ø> (ø)
...arketplacePage/components/NpmPackagesGrid/index.js 100.00% <ø> (ø)
...in/admin/src/pages/MarketplacePage/tests/server.js 81.81% <ø> (ø)
...pe-builder/admin/src/components/FormModal/index.js 0.00% <0.00%> (ø)
...nager/components/DynamicTable/CellContent/index.js 48.71% <33.33%> (-1.29%) :arrow_down:
...ontent-manager/components/SelectOne/SingleValue.js 54.83% <33.33%> (-0.34%) :arrow_down:
...lewares/extendCTBAttributeInitialDataMiddleware.js 88.23% <40.00%> (-8.32%) :arrow_down:
...e/components/NpmPackageCard/InstallPluginButton.js 88.46% <62.50%> (+0.46%) :arrow_up:
... and 284 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 19 '22 09:10 codecov[bot]

LGTM but one request: could you add a little test of something as proof it actually runs tests correctly?

(Update: you've added some in the encryption PR so I'll try that + this and if it works I'm happy)

innerdvations avatar Oct 20 '22 08:10 innerdvations