-
-
Notifications
You must be signed in to change notification settings - Fork 22
Draft: Support Unity 6.x #108
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -8,9 +8,13 @@ describe('ImageTag', () => { | |||||||||||||||||||||
expect(() => new ImageTag(unityVersion)).not.toThrow(); | ||||||||||||||||||||||
}); | ||||||||||||||||||||||
|
||||||||||||||||||||||
test.each(['2000.0.0f0', '2011.1.11f1'])('accepts %p version format', (version) => { | ||||||||||||||||||||||
test.each(['2000.0.0f0', '2011.1.11f1', '6000.0.0f0'])('accepts %p version format', (version) => { | ||||||||||||||||||||||
expect(() => new ImageTag(version)).not.toThrow(); | ||||||||||||||||||||||
}); | ||||||||||||||||||||||
|
||||||||||||||||||||||
test.each(['1999.1.1f1', '6000.1.invalid'])('rejects %p version format', (version) => { | ||||||||||||||||||||||
expect(() => new ImageTag(version)).toThrow(`Invalid version "${version}".`); | ||||||||||||||||||||||
}); | ||||||||||||||||||||||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Address i18n linting and formatting. The test cases correctly validate that invalid version formats are rejected with the appropriate error message. Apply this diff to fix the formatting and address the i18n linting warning: - test.each(['1999.1.1f1', '6000.1.invalid'])('rejects %p version format', (version) => {
- expect(() => new ImageTag(version)).toThrow(`Invalid version "${version}".`);
- });
+ test.each(['1999.1.1f1', '6000.1.invalid'])(
+ 'rejects %p version format',
+ (version) => {
+ // eslint-disable-next-line i18n-text/no-en
+ expect(() => new ImageTag(version)).toThrow(`Invalid version "${version}".`);
+ },
+ ); Alternatively, if test files should be excluded from i18n linting, update the ESLint configuration to exclude test files from this rule. 📝 Committable suggestion
Suggested change
🧰 Tools🪛 ESLint[error] 16-16: English text in string literals is not allowed (i18n-text/no-en) |
||||||||||||||||||||||
}); | ||||||||||||||||||||||
describe('toString', () => { | ||||||||||||||||||||||
it('returns the correct version', () => { | ||||||||||||||||||||||
|
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.
Fix formatting to comply with Prettier.
The test logic correctly validates the new Unity 6000.x version format alongside existing formats.
Apply this diff to fix the Prettier formatting issues:
📝 Committable suggestion
🧰 Tools
🪛 ESLint
[error] 11-11: Replace
'accepts·%p·version·format',
with⏎······'accepts·%p·version·format',⏎·····
(prettier/prettier)
[error] 12-12: Insert
··
(prettier/prettier)
[error] 13-13: Replace
}
with··},⏎····
(prettier/prettier)
🤖 Prompt for AI Agents