-
Notifications
You must be signed in to change notification settings - Fork 120
Improve content test for videoId
field
#1656
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
Improve content test for videoId
field
#1656
Conversation
✅ Deploy Preview for codingtrain ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hi @fturmel thanks again! Am I confused or is there a mistake in this PR where a bunch of videoIds are removed? Perhaps that is leftover from testing the tests themselves? |
1 similar comment
Hi @fturmel thanks again! Am I confused or is there a mistake in this PR where a bunch of videoIds are removed? Perhaps that is leftover from testing the tests themselves? |
No it's intended, sorry I wasn't clear. There's a bug fix and an improvement in there:
|
Ah, I see! Thank you for the clarification. Would it be more clear to remove the field entirely rather than have it as a blank entry? |
Sure, we can make the check more strict instead of being falsy (which allows undefined, null or empty string). Update incoming. |
Done, the top-level |
Fantastic! |
#1655 made me realize that there was an error in the way the video schema was defined, and it was allowing empty
videoId
to pass the tests.The check was also updated so that the top-level
videoId
must be empty or undefined instead of optional when a video is multi-part. It should help avoid confusion and information repetition.