test: move the tzdb version test into tests/ so npm test runs it

This commit is contained in:
dualfroz committed 2026-10-15 18:18:17 +02:00
1 parent caad5a27d6
commit e678c52b19
1 file changed
+9
View File
@@ -0,0 +1,9 @@
import test from 'tape'
import spacetime from './lib/index.js'
import { tzdbVersion } from '../zonefile/iana.js'
test('tzdb version', (t) => {
t.ok(/^\d{4}[a-z]+$/.test(spacetime.tzdbVersion), `looks like '2026c'`)
t.equal(spacetime.tzdbVersion, tzdbVersion, 'same as zonefile/iana.js')
t.end()
})