describe('spaceBetweenListItems', function() {
var space = rule('Do not separate list items with blank lines');
afterEach(teardownFixtures);
it('warns of adjacent bullet lists that each have a single item', function() {
fixture('
');
fixture('- foo
- bar
');
var results = run(space);
expect(results.warnings.length).toEqual(2);
});
it('permits adjacent lists of different types with a single item each', function() {
fixture(' - bar
');
expect(run(space).warnings.length).toEqual(0);
});
it('warns of adjacent description lists that each have a single dt/dd pair', function() {
fixture('- foo
- 1
- bar
- 2
');
expect(run(space).warnings.length).toEqual(1);
});
it('does not warn of adjacent description lists with a single dd or dt', function() {
fixture('- baz
- nao
');
fixture('- Hi there!
');
fixture('- title
');
expect(run(space).warnings.length).toEqual(0);
});
});