Merge comments
This commit is contained in:
@@ -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',
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user