-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Guide on unit testing #6324
Guide on unit testing #6324
Conversation
Update tutorial files to use the Collection type instead of Content type Signed-off-by: adriatic <nik@congral.com>
…github.com/lauriejim) Signed-off-by: Nikolaj Ivancic <nik@congral.com>
Signed-off-by: Jim LAURIE <j.laurie6993@gmail.com>
Update documentation from Content to Collection Type
Add rfcs into the contribution docs
Heroku Error: self-signed certificate SSL fix for PG '^8.0.0'. Setting SSL options to `"ssl": { "rejectUnauthorized": false }` enables SSL but does not reject self-signed certificate for Heroku deployment. The issue occurs when Heroku invokes node application but fails at SSL cert for PG ^8.0.0. Signed-off-by: Kelvin Tsoi <ktsoi@wearfigs.com>
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Signed-off-by: Jim LAURIE <j.laurie6993@gmail.com>
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Move to Github discussions for beta docs
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Update FAQ for Beta Docs
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
Update GCP host in beta docs
Codecov Report
@@ Coverage Diff @@
## documentation #6324 +/- ##
==============================================
Coverage 19.14% 19.14%
==============================================
Files 855 855
Lines 11933 11933
Branches 1898 1898
==============================================
Hits 2284 2284
Misses 8100 8100
Partials 1549 1549
Continue to review full report at Codecov.
|
Thank you for this guide! I've seen a number of users asking about this. 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for this guide, this is super useful!
LGTM!
Before merging it, I would like the approval from the tech team.
Ping @alexandrebodin for a tech review.
Code examples from the guide are here https://github.com/qunabu/strapi-unit-test-example is that helps. |
Hello @qunabu thank you for this guide. We are releasing the stable version soon and the configuration changed. Your PR will not be up to date with the stable release. Can you look at the latest doc on the master branch and update your PR accordingly ? |
Done |
async function setupStrapi() { | ||
if (!instance) { | ||
/** the follwing code in copied from `./node_modules/strapi/lib/Strapi.js` */ | ||
await Strapi().load(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we made some changes to the load function, it now calls the bootstrap directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexandrebodin - Which of https://www.npmjs.com/package/strapi versions I should use in my example (https://github.com/qunabu/strapi-unit-test-example/blob/master/package.json) in order to use up to date version?
I'm using latest 3.0.0-beta.20.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use 3.0.0 :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexandrebodin I've updated my example code https://github.com/qunabu/strapi-unit-test-example
I'm going to update this as well, yet should this PR be into master
or documentation
branch?
#6361 that is the improved version |
Description of what you did:
Documentation update on unit testing based on my medium post https://medium.com/qunabu-interactive/strapi-jest-testing-with-gitlab-ci-82ffe4c5715a.
Sample repository to that includes the examples from the guide https://github.com/qunabu/strapi-unit-test-example