var testPackage = require('../../helpers/test-package'); var Dgeni = require('dgeni'); const plugin = require('./h1-checker'); describe('h1Checker postprocessor', () => { let processor, createDocMessage; beforeEach(() => { const dgeni = new Dgeni([testPackage('angular-base-package')]); const injector = dgeni.configureInjector(); createDocMessage = injector.get('createDocMessage'); processor = injector.get('postProcessHtml'); processor.docTypes = ['a']; processor.plugins = [plugin]; }); it('should complain if there is more than one h1 in a document', () => { const doc = { docType: 'a', renderedContent: `