build(aio): fix empty docplaster processing

This commit is contained in:
Peter Bacon Darwin
2017-04-01 00:07:14 +01:00
committed by Alex Rickabaugh
parent 5fbb0d050c
commit 3e793f079d
2 changed files with 15 additions and 2 deletions

View File

@ -153,6 +153,16 @@ describe('regionParser service', () => {
expect(output.regions['A']).toEqual(t('jkl', '/* ... elided ... */', 'pqr'));
});
it('should remove the plaster altogether if the current plaster string is ""', () => {
const output = regionParser(
t('/* #docregion */', 'abc', '/* #enddocregion */', 'def', '/* #docregion */', 'ghi',
'/* #enddocregion */', '/* #docplaster */', '/* #docregion A */', 'jkl',
'/* #enddocregion A */', 'mno', '/* #docregion A */', 'pqr', '/* #enddocregion A */'),
'test-type');
expect(output.regions['']).toEqual(t('abc', '/* . . . */', 'ghi'));
expect(output.regions['A']).toEqual(t('jkl', 'pqr'));
});
it('should parse multiple region names separated by commas', () => {
const output = regionParser(
t('/* #docregion , A, B */', 'abc', '/* #enddocregion B */', '/* #docregion C */', 'xyz',