Merge comments

This commit is contained in:
Nora
2022-11-15 14:19:35 +01:00
parent cf7e33363a
commit a012d80341
2 changed files with 17 additions and 14 deletions

View File

@@ -11,11 +11,11 @@ export interface DbConfigDatabases {
}
export interface SelectedDbItem {
kind: SelectedDbKind;
kind: SelectedDbItemKind;
value: string;
}
export enum SelectedDbKind {
export enum SelectedDbItemKind {
ConfigDefined = 'configDefined',
RemoteSystemDefinedList = 'remoteSystemDefinedList',
}

View File

@@ -11,6 +11,7 @@ describe('db config validation', async () => {
// We're intentionally bypassing the type check because we'd
// like to make sure validation errors are highlighted.
const dbConfig = {
'databases': {
'remote': {
'repositoryLists': [
{
@@ -21,13 +22,15 @@ describe('db config validation', async () => {
'repositories': ['owner/repo1', 'owner/repo2', 'owner/repo3'],
'somethingElse': 'bar'
}
}
} as any as DbConfig;
const validationOutput = configValidator.validate(dbConfig);
expect(validationOutput).to.have.length(2);
expect(validationOutput).to.have.length(3);
expect(validationOutput[0]).to.deep.equal(' must have required property \'databases\'');
expect(validationOutput[1]).to.deep.equal(' must NOT have additional properties');
expect(validationOutput[0]).to.deep.equal('/databases must have required property \'local\'');
expect(validationOutput[1]).to.deep.equal('/databases/remote must have required property \'owners\'');
expect(validationOutput[2]).to.deep.equal('/databases/remote must NOT have additional properties');
});
});