···3333 expect( p.lede.length ).toBeGreaterThan( 0 );
3434 }
3535 } );
3636+3737+ // The greeting is rendered next to the live clock ("<greeting> · 10:23"), so a
3838+ // calendar word in it must agree with the wall clock — no "Good afternoon" before noon.
3939+ it( 'never greets with a time-of-day word that contradicts the hour', () => {
4040+ for ( let hour = 0; hour < 24; hour++ ) {
4141+ const { greeting } = PHASES[ phaseForHour( hour ) ];
4242+ const at = `"${ greeting }" shown at ${ hour }:00`;
4343+ if ( /morning/i.test( greeting ) ) {
4444+ expect( hour, at ).toBeLessThan( 12 );
4545+ }
4646+ if ( /afternoon/i.test( greeting ) ) {
4747+ expect( hour, at ).toBeGreaterThanOrEqual( 12 );
4848+ expect( hour, at ).toBeLessThan( 18 );
4949+ }
5050+ if ( /evening/i.test( greeting ) ) {
5151+ expect( hour, at ).toBeGreaterThanOrEqual( 17 );
5252+ }
5353+ }
5454+ } );
3655} );
+1-1
src/lib/landing/time-of-day.ts
···3030 lede: 'A calm place to write long-form, and publish it to the open social web.',
3131 },
3232 midday: {
3333- greeting: 'Good afternoon',
3333+ greeting: 'Sun’s up',
3434 headlineHtml: 'Write something <em>worth keeping.</em>',
3535 lede: 'A calm place to write long-form, and publish it to the open social web.',
3636 },