Files
upload-google-play/__tests__/whatsnew.test.ts
Jack Boswell 7cd1379b4f refactor: Centralized input validation (#142)
* Initial implementaion of service account json, user fraction and status validation

* Move validation to input-validation
Also created some more validators

* Rearrange whatsnew tests to clear out test folder

* Return error messages for input validation

* Create tests for some validation code

* Separate user fraction and status validation

* Write more tests and fix some bugs

* Refactor to use promises

* Fix release file loading from glob
2022-09-21 17:15:54 +12:00

31 lines
895 B
TypeScript

import {readLocalizedReleaseNotes} from "../src/whatsnew";
test("read localized whatsnew files", async () => {
let texts = await readLocalizedReleaseNotes("./__tests__/whatsnew");
expect(texts).toHaveLength(6);
expect(texts).toContainEqual({
language: "en-US",
text: "test_changelog_file"
});
expect(texts).toContainEqual({
language: "de-DE",
text: "test_changelog_file_german"
});
expect(texts).toContainEqual({
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"
});
});