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
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
import * as process from 'process'
|
||||
import * as cp from 'child_process'
|
||||
import * as path from 'path'
|
||||
import {readLocalizedReleaseNotes} from "../src/whatsnew";
|
||||
import {androidpublisher_v3} from "@googleapis/androidpublisher";
|
||||
import LocalizedText = androidpublisher_v3.Schema$LocalizedText;
|
||||
|
||||
test("read localized whatsnew files", async () => {
|
||||
let texts = await readLocalizedReleaseNotes("./__tests__");
|
||||
let texts = await readLocalizedReleaseNotes("./__tests__/whatsnew");
|
||||
expect(texts).toHaveLength(6);
|
||||
expect(texts).toContainEqual({
|
||||
language: "en-US",
|
||||
@@ -32,4 +27,4 @@ test("read localized whatsnew files", async () => {
|
||||
language: "et",
|
||||
text: "test_changelog_file_estonian"
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user