feat(dev-infra): introduce validators for ng-dev config loading (#37049)
Introduces infrastructure to validate configuration of the ng-dev command at run time. Allowing for errors to be returned to the user running the command. PR Close #37049
This commit is contained in:

committed by
Misko Hevery

parent
45f4a47286
commit
14c0ec97d8
@ -7,11 +7,9 @@
|
||||
*/
|
||||
|
||||
// Imports
|
||||
import * as utilConfig from '../utils/config';
|
||||
|
||||
import * as validateConfig from './config';
|
||||
import {validateCommitMessage} from './validate';
|
||||
|
||||
|
||||
// Constants
|
||||
const config = {
|
||||
'commitMessage': {
|
||||
@ -46,7 +44,7 @@ describe('validate-commit-message.js', () => {
|
||||
lastError = '';
|
||||
|
||||
spyOn(console, 'error').and.callFake((msg: string) => lastError = msg);
|
||||
spyOn(utilConfig, 'getAngularDevConfig').and.returnValue(config);
|
||||
spyOn(validateConfig, 'getCommitMessageConfig').and.returnValue(config);
|
||||
});
|
||||
|
||||
describe('validateMessage()', () => {
|
||||
|
Reference in New Issue
Block a user