mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 13:05:49 +02:00
lint: fix quotes
This commit is contained in:
16
test/i18n.js
16
test/i18n.js
@@ -59,7 +59,7 @@ describe('i18n', () => {
|
|||||||
describe('(regexp validation)', () => {
|
describe('(regexp validation)', () => {
|
||||||
const valid = [
|
const valid = [
|
||||||
'foo.bar', 'foo.bar-baz', 'foo.bar.baz-quux-lorem-ipsum-dolor-sit-amet', 'foo.barBazQuux', // human generated
|
'foo.bar', 'foo.bar-baz', 'foo.bar.baz-quux-lorem-ipsum-dolor-sit-amet', 'foo.barBazQuux', // human generated
|
||||||
"example-name.isValid", "kebab-case.isGood", "camelcase.isFine", "camelcase.with-dashes.isAlsoFine", "single-character.is-ok", "abc.def", // chatgpt generated
|
'example-name.isValid', 'kebab-case.isGood', 'camelcase.isFine', 'camelcase.with-dashes.isAlsoFine', 'single-character.is-ok', 'abc.def', // chatgpt generated
|
||||||
];
|
];
|
||||||
const invalid = [
|
const invalid = [
|
||||||
// human generated
|
// human generated
|
||||||
@@ -68,21 +68,21 @@ describe('i18n', () => {
|
|||||||
'foo.BarBazQuux',
|
'foo.BarBazQuux',
|
||||||
|
|
||||||
// chatgpt generated
|
// chatgpt generated
|
||||||
"!notValid", // Starts with a special character
|
'!notValid', // Starts with a special character
|
||||||
"with space.isInvalid", // Contains a space
|
'with space.isInvalid', // Contains a space
|
||||||
".startsWithPeriod.isInvalid", // Starts with a period
|
'.startsWithPeriod.isInvalid', // Starts with a period
|
||||||
"invalid..case.isInvalid", // Consecutive periods
|
'invalid..case.isInvalid', // Consecutive periods
|
||||||
"camelCase.With-Dashes.isAlsoInvalid", // PascalCase "With" is not allowed
|
'camelCase.With-Dashes.isAlsoInvalid', // PascalCase "With" is not allowed
|
||||||
];
|
];
|
||||||
|
|
||||||
valid.forEach((key) => {
|
valid.forEach((key) => {
|
||||||
it(key, () => {
|
it(key, () => {
|
||||||
assert(test.test(key))
|
assert(test.test(key));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
invalid.forEach((key) => {
|
invalid.forEach((key) => {
|
||||||
it(key, () => {
|
it(key, () => {
|
||||||
assert(!test.test(key))
|
assert(!test.test(key));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user