GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add a test to ensure the correctness of timezone upgrades · nodejs/node@197df63

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • timezone-update.yml
  • test
    • fixtures
      • tz-version.txt
    • parallel
      • test-tz-version.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/timezone-update.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/timezone-update.yml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636

3737
- run: ./tools/update-timezone.mjs
3838

39+
- name: Update the expected timezone version in test
40+
run: echo "${{ env.new_version }}" > test/fixtures/tz-version.txt
41+
3942
- name: Open Pull Request
4043
uses: gr2m/create-or-update-pull-request-action@dc1726cbf4dd3ce766af4ec29cfb660e0125e8ee # Create a PR or update the Action's existing PR
4144
env:
Collapse file

‎test/fixtures/tz-version.txt‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022e
Collapse file

‎test/parallel/test-tz-version.js‎

Copy file name to clipboard
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
if (!common.hasIntl) {
6+
common.skip('missing Intl');
7+
}
8+
9+
// Refs: https://github.com/nodejs/node/blob/1af63a90ca3a59ca05b3a12ad7dbea04008db7d9/configure.py#L1694-L1711
10+
if (process.config.variables.icu_path !== 'deps/icu-small') {
11+
// If Node.js is configured to use its built-in ICU, it uses a strict subset
12+
// of ICU formed using `tools/icu/shrink-icu-src.py`, which is present in
13+
// `deps/icu-small`. It is not the same as configuring the build with
14+
// `./configure --with-intl=small-icu`. The latter only uses a subset of the
15+
// locales, i.e., it uses the English locale, `root,en`, by default and other
16+
// locales can also be specified using the `--with-icu-locales` option.
17+
common.skip('not using the icu data file present in deps/icu-small/source/data/in/icudt##l.dat.bz2');
18+
}
19+
20+
const fixtures = require('../common/fixtures');
21+
22+
// This test ensures the correctness of the automated timezone upgrade PRs.
23+
24+
const { strictEqual } = require('assert');
25+
const { readFileSync } = require('fs');
26+
27+
const expectedVersion = readFileSync(fixtures.path('tz-version.txt'), 'utf8').trim();
28+
strictEqual(process.versions.tz, expectedVersion);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.