aso: App Store keyword fill hint and limit both count UTF-8 bytes (non-Latin locales were warned to add characters that would break the 100-byte limit)
This commit is contained in:
parent
43daeef97f
commit
41b92dfa13
2 changed files with 14 additions and 4 deletions
|
|
@ -148,10 +148,18 @@ describe('mcp: screenshot and video tools', () => {
|
|||
});
|
||||
|
||||
describe('aso', () => {
|
||||
test('App Store keywords count bytes, not characters (limit and fill hint)', () => {
|
||||
const msgs = (kw: string) => auditAppleKeywords('ru', { keywords: kw } as never, 'X').map(f => f.msg);
|
||||
const short = 'игра,бег,прыжки,монеты,уровни,рекорд,аркада'; // 43 characters, 80 bytes
|
||||
expect(msgs(short).some(m => m.includes('80/100 bytes') && m.includes('fill at least 90'))).toBe(true);
|
||||
const full = short + ',быстро'; // 50 characters but 93 bytes: full enough
|
||||
expect(msgs(full).some(m => m.includes('fill at least 90'))).toBe(false);
|
||||
expect(msgs(full + ',звук').some(m => m.includes('102 bytes > 100'))).toBe(true);
|
||||
});
|
||||
test('keyword field rules', () => {
|
||||
const f = auditAppleKeywords('en-US', { subtitle: 'Relaxing puzzle', keywords: 'match,puzzle,match,free game' }, 'Tile Match');
|
||||
const text = f.map(x => `${x.level}:${x.msg}`).join('\n');
|
||||
expect(text).toContain('warn:keywords: 28/100 used');
|
||||
expect(text).toContain('warn:keywords: 28/100 bytes used');
|
||||
expect(text).toContain('"match" listed twice');
|
||||
expect(text).toContain('repeat words from the name / subtitle (already indexed): match, puzzle');
|
||||
expect(text).toContain('filler words that rarely help: free, game');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue