From dbcf8d56fb0b20d5abb58e20944ee3a79c052f14 Mon Sep 17 00:00:00 2001 From: Jesse Hallett Date: Mon, 6 Jan 2014 13:55:04 -0800 Subject: Creates test suite for Wikipedia guidelines --- .../wikipedia/specs/spaceBetweenListItems_spec.js | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 guidelines/wikipedia/specs/spaceBetweenListItems_spec.js (limited to 'guidelines/wikipedia/specs/spaceBetweenListItems_spec.js') diff --git a/guidelines/wikipedia/specs/spaceBetweenListItems_spec.js b/guidelines/wikipedia/specs/spaceBetweenListItems_spec.js new file mode 100644 index 0000000..6ea8a83 --- /dev/null +++ b/guidelines/wikipedia/specs/spaceBetweenListItems_spec.js @@ -0,0 +1,29 @@ +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('
  1. foo
  1. 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('
  1. 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); + }); +}); -- cgit v1.2.3