Fix: Support BCP 47 language codes without contry code (#73)
* Updated regex to support BCP 47 language codes without country code * Updated whatsnew tests Co-authored-by: Pablo A. Martínez <pamartinez@boiradev.com>
This commit is contained in:
committed by
GitHub
parent
060a2efa0e
commit
8c2ebfdb6e
1
__tests__/whatsnew-ca
Normal file
1
__tests__/whatsnew-ca
Normal file
@@ -0,0 +1 @@
|
||||
test_changelog_file_catalan
|
||||
1
__tests__/whatsnew-es-ES
Normal file
1
__tests__/whatsnew-es-ES
Normal file
@@ -0,0 +1 @@
|
||||
test_changelog_file_spanish
|
||||
1
__tests__/whatsnew-et
Normal file
1
__tests__/whatsnew-et
Normal file
@@ -0,0 +1 @@
|
||||
test_changelog_file_estonian
|
||||
@@ -7,7 +7,7 @@ import LocalizedText = androidpublisher_v3.Schema$LocalizedText;
|
||||
|
||||
test("read localized whatsnew files", async () => {
|
||||
let texts = await readLocalizedReleaseNotes("./__tests__");
|
||||
expect(texts).toHaveLength(3);
|
||||
expect(texts).toHaveLength(6);
|
||||
expect(texts).toContainEqual({
|
||||
language: "en-US",
|
||||
text: "test_changelog_file"
|
||||
@@ -20,4 +20,16 @@ test("read localized whatsnew files", async () => {
|
||||
language: "ja-JP",
|
||||
text: "test_changelog_file_japanese"
|
||||
});
|
||||
expect(texts).toContainEqual({
|
||||
language: "ca",
|
||||
text: "test_changelog_file_catalan"
|
||||
});
|
||||
expect(texts).toContainEqual({
|
||||
language: "es-ES",
|
||||
text: "test_changelog_file_spanish"
|
||||
});
|
||||
expect(texts).toContainEqual({
|
||||
language: "et",
|
||||
text: "test_changelog_file_estonian"
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user