Skip to content

Add test suite and GitHub Actions CI#8

Merged
rhinot merged 2 commits intomainfrom
pr-tests
Mar 22, 2026
Merged

Add test suite and GitHub Actions CI#8
rhinot merged 2 commits intomainfrom
pr-tests

Conversation

@rhinot
Copy link
Copy Markdown
Collaborator

@rhinot rhinot commented Mar 22, 2026

Summary

  • netlify/airport-map.test.js — updated for lxndrblz data source: covers well-known airports, regional airports, all metro area codes (NYC, LON, TYO, PAR, CHI…), TZ alias normalization (Brazil/EastAmerica/Sao_Paulo), and the TCI collision
  • netlify/resolve-zone.test.js — validates the overrides table in common.js without importing it at runtime (avoids the tzdata ESM incompatibility). Covers: timezone abbreviations, IANA passthrough, airport codes, metro codes, override-only codes (TCI/QDF/QHO/QMI), colloquial aliases, and override-beats-airport-map precedence
  • netlify/og.test.js — canvas smoke test: createCanvas, fill, toBuffer, PNG magic bytes. Directly verifies the canvas upgrade didn't break OG image generation
  • package.json — adds "test" script
  • .github/workflows/ci.yml — runs npm ci + npm test + npm audit --audit-level=high on every PR and push to main

Test plan

  • npm test runs all 86 assertions and exits 0
  • CI workflow triggers on this PR and goes green
  • npm audit step in CI catches any future high-severity vulnerabilities

rhinot added 2 commits March 22, 2026 10:44
- Rewrites build-airport-map.mjs to fetch airports.csv + citycodes.csv
  from lxndrblz/Airports at build time (no local file or airport-timezone
  devDependency needed); OurAirports approach preserved in comments
- Regenerates airport-map-data.json: 9,803 airports + 27 metro codes
  + 5 derived city codes = 9,835 total entries
- Trims common.js metro overrides to only the 4 not covered by the new
  data (TCI collision, QDF/QHO/QMI absent)
- Updates homepage to document timezone, airport, and metro code inputs
- airport-map.test.js: updated for lxndrblz source (9k+ entries, metro codes,
  TZ alias normalization, TCI collision); 50 assertions
- resolve-zone.test.js: validates overrides table in common.js and confirms
  airport map + overrides cover timezone abbrevs, airport codes, metro codes,
  TCI/QDF/QHO/QMI override-only codes, and colloquial aliases; 31 assertions
- og.test.js: canvas smoke test — createCanvas, fill, toBuffer, PNG magic bytes;
  5 assertions
- package.json: adds "test" script wiring all three files
- .github/workflows/ci.yml: runs npm ci + npm test + npm audit on every PR and push to main
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 22, 2026

Deploy Preview for timezone-fyi ready!

Name Link
🔨 Latest commit 511776b
🔍 Latest deploy log https://app.netlify.com/projects/timezone-fyi/deploys/69c001e6011e9f0008236bc4
😎 Deploy Preview https://deploy-preview-8--timezone-fyi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rhinot rhinot merged commit 0834fa1 into main Mar 22, 2026
5 checks passed
@rhinot rhinot deleted the pr-tests branch March 22, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant