1'use strict'; 2 3const common = require('../common'); 4 5if (!common.hasIntl) { 6 common.skip('missing Intl'); 7} 8 9// Refs: https://github.com/nodejs/node/blob/1af63a90ca3a59ca05b3a12ad7dbea04008db7d9/configure.py#L1694-L1711 10if (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 20const fixtures = require('../common/fixtures'); 21 22// This test ensures the correctness of the automated timezone upgrade PRs. 23 24const { strictEqual } = require('assert'); 25const { readFileSync } = require('fs'); 26 27const expectedVersion = readFileSync(fixtures.path('tz-version.txt'), 'utf8').trim(); 28strictEqual(process.versions.tz, expectedVersion); 29