aboutsummaryrefslogtreecommitdiffstats
path: root/db/normalized/lnurl_codes.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-06 09:20:25 -0700
committerAdam Soltys <[email protected]>2022-09-06 09:20:25 -0700
commitc2464b2407ee23134732fd67586758dbfe18f9b5 (patch)
tree3e2d9f009bb325a9a7c4304ea02f6e64dda85bd1 /db/normalized/lnurl_codes.js
parent8a080ef9a198799e7ee31cf81f92afd5495e4074 (diff)
downloadcoinos-server-c2464b2407ee23134732fd67586758dbfe18f9b5.tar.gz
coinos-server-c2464b2407ee23134732fd67586758dbfe18f9b5.zip
prettier
Diffstat (limited to 'db/normalized/lnurl_codes.js')
0 files changed, 0 insertions, 0 deletions
Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
// The Feed destination and the new-posts pill deliberately have different
// navigation semantics. Keep this small source-level guard beside the fuller
// browser test for the pill's landing position.
import assert from 'node:assert/strict';

const source = await Bun.file('src/features/messages.js').text();
const navStart = source.indexOf("button('feed', t('feedTitle')");
const navEnd = source.indexOf("button('messages',", navStart);
const feedButton = source.slice(navStart, navEnd);
assert(navStart > 0 && navEnd > navStart, 'Feed bottom-nav handler exists');
assert(feedButton.includes('glideToTop()'), 'Feed bottom-nav button returns to the top');
assert(!feedButton.includes('jumpToNew()'), 'Feed bottom-nav button does not jump to unread posts');

const pillStart = source.indexOf("class: 'feed-new-pill'");
const pill = source.slice(pillStart, source.indexOf('})', pillStart) + 2);
assert(pillStart > 0 && pill.includes('jumpToNew()'), 'new-posts pill jumps to the first unread arrival');

console.log('✓ Feed tab goes to the top; only the new-posts pill jumps to unread posts');