File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed
Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ /** No operation. */
2+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change 1+ import { expect , test } from "@libs/testing"
2+ import { noop } from "./noop.ts"
3+
4+ test ( "`noop()` does nothing" , ( ) => expect ( noop ( ) ) . toBeUndefined ( ) )
Original file line number Diff line number Diff line change 1+ /** Supported timezones in the current runtime. */
2+ export const timezones = [ ...Intl . supportedValuesOf ( "timeZone" ) , "UTC" ] as string [ ]
3+
4+ /** Current timezone in the runtime. */
5+ export const timezone = Intl . DateTimeFormat ( ) . resolvedOptions ( ) . timeZone as string
Original file line number Diff line number Diff line change 1+ // Copyright (c) - 2025+ the lowlighter/esquie authors. AGPL-3.0-or-later
2+ import { expect , test } from "@libs/testing"
3+ import { timezone , timezones } from "./timezone.ts"
4+
5+ test ( "`timezones` contains supported timezones" , ( ) => {
6+ expect ( timezones . length ) . toBeGreaterThan ( 0 )
7+ expect ( timezones ) . toContain ( "Europe/Paris" )
8+ expect ( timezones ) . not . toContain ( "Invalid/Timezone" )
9+ } )
10+
11+ test ( "`timezone` is defined" , ( ) => {
12+ expect ( timezone ) . toBeType ( "string" )
13+ } )
You can’t perform that action at this time.
0 commit comments