describe('pseudoHeadings', function() { var pseudo = rule('Do not make pseudo-headings'); afterEach(teardownFixtures); it('does not allow paragraphs with all bold text', function() { var $p = fixture('
pseudo heading
'); var results = run(pseudo); expect(results.errors.length).toEqual(1); expect(results.errors[0].element).toEqual($p.find('b').get(0)); }); it('permits paragraphs that include bold and non-bold text', function() { fixture('this paragraph contains non-bold text
'); expect(run(pseudo).errors.length).toEqual(0); }); });