-
Notifications
You must be signed in to change notification settings - Fork 23
test: add tests for getCldOgImageUrl #150
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
Conversation
|
|
@sccalabr is attempting to deploy a commit to the Cloudinary DevX Team on Vercel. A member of the Team first needs to authorize it. |
|
I am having a hard time testing this. I am running the pnpm run tests but I am getting My .env has so not really sure what I am missing |
b378eba to
554d9f5
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Is the cloud name filled out with your cloud name from the dashboard? |
|
Oh I think I see - for tests we don't use a real cloud name, as we aren't actually making any requests to cloudinary. We're only testing the output to see if it's what we expect, for example that it contains the correct width. When testing a component you can use the Does that make sense? |
Im pretty sure it is. I got it from the api account dashboard. I'll double check later today |
I see, let me give that a try :) |
|
awesome! let me know if you need any more help 🙏 |
554d9f5 to
95bc8b6
Compare
|
I think I got it working. Let me know what you think! |
packages/svelte-cloudinary/tests/GetCldOgImageUrl/GetCldOgImageUrl.test.ts
Outdated
Show resolved
Hide resolved
270234c to
5c2d70e
Compare
ghostdevv
left a comment
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.
Last things! Are you getting an error in your IDE about missing an alt property in any of these options?
| format: options.format ?? 'jpg', | ||
| width: options.width ?? 1200, | ||
| height: options.height ?? 627, | ||
| height: options.height ?? 630, |
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.
The 627 that was here before is the right one 🙏
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.
Then we need to update the documentation
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.
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.
Oh good catch, would you like to update that? It's in packages/docs/src/content/docs/helpers/getcldogimageurl/configuration.mdx
packages/svelte-cloudinary/tests/GetCldOgImageUrl/GetCldOgImageUrl.test.ts
Outdated
Show resolved
Hide resolved
packages/svelte-cloudinary/tests/GetCldOgImageUrl/GetCldOgImageUrl.test.ts
Outdated
Show resolved
Hide resolved
5c2d70e to
0af4144
Compare
I am not seeing any errors in vscode for that. Should I be? |
Ah, no you're right - I was getting confused with the component version 😅 |
0af4144 to
122a5de
Compare
|
perfect, thank you! |
|
@all-contributors please add @sccalabr for test |
|
I've put up a pull request to add @sccalabr! 🎉 |
|
@sccalabr thanks for your contribution. This PR is eligible for free Cloudinary Hacktoberfest swag. Please send me an email to [email protected] with your name, GitHub username, a link to this PR. Happy Hacktoberfest! |
Description
Creating basic tests for GetCldOgImageUrl
Issue Ticket Number
Fixes #147
Type of change
Checklist