Finish up some testing of the configure block

This commit is contained in:
R Tyler Croy 2019-07-06 20:35:25 -07:00
parent 73461af8c1
commit 5bdd7b6c74
No known key found for this signature in database
GPG Key ID: E5C92681BEF6CEA2
1 changed files with 15 additions and 0 deletions

View File

@ -12,4 +12,19 @@ describe('configure {}', () => {
it('should pass with an empty configure block', () => {
expect(parse(`configure {} ${MIN_PIPELINE}`)).toHaveLength(0);
});
it('should pass on an empty settings block within the configure {}', () => {
expect(parse(`configure { github {} } ${MIN_PIPELINE}`)).toHaveLength(0);
});
it('should fail on a missing block', () => {
expect(parse(`configure { github } ${MIN_PIPELINE}`)).not.toHaveLength(0);
});
it('should pass on a settings block within the configure {}', () => {
expect(parse(`configure { github { account = 'rtyler' } } ${MIN_PIPELINE}`)).toHaveLength(0);
});
it('should pass on a many settings within the configure {}', () => {
expect(parse(`configure { github { account = 'rtyler' endpoint = 'api.github.com' } } ${MIN_PIPELINE}`)).toHaveLength(0);
});
});