-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add unit test and sample for UNSYNCEDLYRICS vorbis tag #1636
base: master
Are you sure you want to change the base?
Conversation
Could you please merge this? Or is there something else I need to take care of? |
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.
Thanks for your contribution @Vorelli, in principal a good change.
Please update the PR title and description.
The PR title is used in the change-log, to summarize this improvement, as port of the next release, to the user. In the description (initial comment) you can be more specific. If possible link to UNSYNCEDLYRICS
documentation or other reference material describing this tag.
Advice for future PR's, do not no use your master branch to create a PR. That prevents you from syncing changes from this master in your local clone.
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.
Please use a much smaller sample, truncate the audio content to a minimum.
yarn.lock
Outdated
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.
This change should not be part of this PR.
flacFilePath, | ||
"Sister City - Swan Dive - 01 Attenborough Blues.flac" | ||
); | ||
const { format, common, native } = await mm.parseFile(filePath); |
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.
Not used
assert.strictEqual(format.container, "FLAC", "format.container"); | ||
assert.strictEqual(format.codec, "FLAC", "format.codec"); | ||
|
||
assert.strictEqual(common.lyrics instanceof Array && common.lyrics[0] && common.lyrics[0].length > 0, true); |
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.
Be verbose and explicit unit test, provide clear message where and what is wrong in case of failing unit test.
assert.strictEqual(common.lyrics instanceof Array && common.lyrics[0] && common.lyrics[0].length > 0, true); | |
assert.isArray(common.lyrics, 'common.lyrics'); | |
assert.isNotEmpty(common.lyrics, 'common.lyrics'); |
"A primate blessed with common sense\r\n" + | ||
"With empathy and with arrogance\r\n" + | ||
"I am swinging from the trees\r\n" + | ||
"I am crawling out of the sea" |
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.
Include the metadata field name you are checking:
"I am crawling out of the sea" | |
"I am crawling out of the sea", 'common.lyrics'); |
749649b
to
1555826
Compare
No description provided.