From a4574b9b27516f11cad61916060f5d2cbb37d64b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Jul 2026 14:20:59 +0000 Subject: [PATCH 1/2] test(@stdlib/dstructs/named-typed-tuple): fix locale-specific `toLocaleString` assertion The job `Node.js v12` on workflow `linux_test` failed on develop with a mismatched `toLocaleString` assertion in `test.to_locale_string.js`. Root cause: the test hardcoded a literal expected string assuming de-DE locale formatting is always available, but Node.js versions before v13 ship "small-icu" builds by default, which only include full locale data for "en"; other locales such as de-DE silently fall back to default formatting. This commit computes the expected value dynamically via `.toLocaleString( 'de-DE' )`, matching the pattern already used by the sibling "default locale" and "locale and options" tests in the same file, so the assertion no longer depends on which ICU data is compiled into the runtime. Ref: https://github.com/stdlib-js/stdlib/actions/runs/30532379700 --- .../dstructs/named-typed-tuple/test/test.to_locale_string.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js b/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js index 3ee752ae275e..88d125abe9b4 100644 --- a/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js +++ b/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js @@ -103,7 +103,7 @@ tape( 'the method serializes a tuple as a locale-specific string (specified loca Point = namedtypedtuple( [ 'price', 'quantity' ] ); p = new Point( [ 123456.789, 9876 ] ); - expected = 'tuple(price=123.456,789, quantity=9.876)'; + expected = 'tuple(price=' + (123456.789).toLocaleString( 'de-DE' ) + ', quantity=' + (9876).toLocaleString( 'de-DE' ) + ')'; actual = p.toLocaleString( 'de-DE' ); t.strictEqual( actual, expected, 'returns expected value' ); From 2986fb2353d75fe322e61b7123317dbb77acf17a Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 30 Jul 2026 15:23:34 -0700 Subject: [PATCH 2/2] test: use string interpolation Signed-off-by: Athan --- .../named-typed-tuple/test/test.to_locale_string.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js b/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js index 88d125abe9b4..6778951015a5 100644 --- a/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js +++ b/lib/node_modules/@stdlib/dstructs/named-typed-tuple/test/test.to_locale_string.js @@ -23,6 +23,7 @@ var tape = require( 'tape' ); var hasProp = require( '@stdlib/assert/has-property' ); var isFunction = require( '@stdlib/assert/is-function' ); +var format = require( '@stdlib/string/format' ); var namedtypedtuple = require( './../lib' ); @@ -87,7 +88,7 @@ tape( 'the method serializes a tuple as a locale-specific string (default locale Point = namedtypedtuple( [ 'price', 'quantity' ] ); p = new Point( [ 123456.789, 9876 ] ); - expected = 'tuple(price=' + (123456.789).toLocaleString() + ', quantity=' + (9876).toLocaleString() + ')'; + expected = format( 'tuple(price=%s, quantity=%s)', (123456.789).toLocaleString(), (9876).toLocaleString() ); actual = p.toLocaleString(); t.strictEqual( actual, expected, 'returns expected value' ); @@ -103,7 +104,7 @@ tape( 'the method serializes a tuple as a locale-specific string (specified loca Point = namedtypedtuple( [ 'price', 'quantity' ] ); p = new Point( [ 123456.789, 9876 ] ); - expected = 'tuple(price=' + (123456.789).toLocaleString( 'de-DE' ) + ', quantity=' + (9876).toLocaleString( 'de-DE' ) + ')'; + expected = format( 'tuple(price=%s, quantity=%s)', (123456.789).toLocaleString( 'de-DE' ), (9876).toLocaleString( 'de-DE' ) ); actual = p.toLocaleString( 'de-DE' ); t.strictEqual( actual, expected, 'returns expected value' ); @@ -124,7 +125,7 @@ tape( 'the method serializes a tuple as a locale-specific string (locale and opt 'currency': 'USD' }; - expected = 'tuple(price=' + (1234.56).toLocaleString( 'en-US', opts ) + ', quantity=' + (50).toLocaleString( 'en-US', opts ) + ')'; + expected = format( 'tuple(price=%s, quantity=%s)', (1234.56).toLocaleString( 'en-US', opts ), (50).toLocaleString( 'en-US', opts ) ); actual = p.toLocaleString( 'en-US', opts ); t.strictEqual( actual, expected, 'returns expected value' );