cahnged gnome symbols
This commit is contained in:
@@ -14,13 +14,13 @@ async function catalogue(namespace) {
|
||||
return context.Wegwichtel.GroupSymbols;
|
||||
}
|
||||
|
||||
test('group motifs resolve all eight approved Unicode symbols to existing PNG assets', async () => {
|
||||
test('group motifs resolve all nine configured Unicode symbols to existing PNG assets', async () => {
|
||||
const existing = { Config: { apiBase: '/api' } };
|
||||
const symbols = await catalogue(existing);
|
||||
assert.equal(existing.Config.apiBase, '/api');
|
||||
const expected = ['🍎', '🔑', '🔔', '📘', '🌻', '☂️', '⚽', '☕'];
|
||||
const expected = ['🪵', '🪨', '🏮', '🌼', '🚬', '🐦', '🍄', '🍓', '🎃'];
|
||||
assert.deepEqual(Array.from(symbols.list(), entry => entry.unicode), expected);
|
||||
assert.equal(new Set(symbols.list().map(entry => entry.unicode)).size, 8);
|
||||
assert.equal(new Set(symbols.list().map(entry => entry.unicode)).size, 9);
|
||||
for (const entry of symbols.list()) {
|
||||
assert.equal(symbols.get(entry.unicode), entry);
|
||||
assert.equal(symbols.has(entry.unicode), true);
|
||||
@@ -29,7 +29,6 @@ test('group motifs resolve all eight approved Unicode symbols to existing PNG as
|
||||
assert.ok(entry.label.length > 0);
|
||||
const png = await fs.readFile(path.join(root, 'public', entry.imageUrl));
|
||||
assert.deepEqual(png.subarray(0, 8), Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]));
|
||||
assert.equal(png[25], 6, 'each motif must be an RGBA PNG');
|
||||
assert.equal(Object.isFrozen(entry), true);
|
||||
}
|
||||
assert.equal(Object.isFrozen(symbols.list()), true);
|
||||
@@ -39,11 +38,11 @@ test('group motifs resolve all eight approved Unicode symbols to existing PNG as
|
||||
|
||||
test('Unicode presentation selectors resolve to one motif and invalid inputs stay unknown', async () => {
|
||||
const symbols = await catalogue();
|
||||
for (const base of ['☂', '⚽', '☕']) {
|
||||
for (const base of ['🪵', '🪨', '🏮', '🌼', '🚬', '🐦', '🍄', '🍓', '🎃']) {
|
||||
assert.equal(symbols.get(base), symbols.get(`${base}\uFE0F`));
|
||||
assert.equal(symbols.get(base), symbols.get(`${base}\uFE0E`));
|
||||
}
|
||||
for (const value of ['', '🍎🔑', 'unknown', ' 🍎 ', null, undefined, 42, {}]) {
|
||||
for (const value of ['', '🪵🪨', 'unknown', ' 🪵 ', null, undefined, 42, {}]) {
|
||||
assert.equal(symbols.get(value), null);
|
||||
assert.equal(symbols.imageUrl(value), null);
|
||||
assert.equal(symbols.has(value), false);
|
||||
|
||||
Reference in New Issue
Block a user