| @@ -9,10 +9,11 @@ module Docs · 8 unmodified lines |
| 9 | 'bdd' => ['describe()', 'context()', 'it()', 'specify()'], | 9 | 'bdd' => ['describe()', 'context()', 'it()', 'specify()'], |
| 10 | 'tdd' => ['suite()', 'test()'], | 10 | 'tdd' => ['suite()', 'test()'], |
| 11 | 'exports' => ['exports'], | 11 | 'exports' => ['exports'], |
| 12 | 'qunit' => ['QUnit'], | | |
| 13 | 'require' => ['require'], | 12 | 'require' => ['require'], |
| 14 | 'browser-specific-methods' => ['mocha.allowUncaught()', 'mocha.setup()', 'mocha.run()', 'mocha.globals()', 'mocha.checkLeaks()'], | 13 | 'running-mocha-in-the-browser' => ['mocha.setup()', 'mocha.run()', 'mocha.globals()', 'mocha.checkLeaks()'], |
| 15 | 'timeouts' => ['timeout()'] | 14 | 'timeouts' => ['timeout()'], |
| | 15 | 'delayed-root-suite' => ['run()'], |
| | 16 | 'command-line-usage' => ['mocha cli options'] |
| 16 | } | 17 | } |
| 17 | | 18 | |
| 18 | def additional_entries | 19 | def additional_entries |
| @@ -24,10 +25,10 @@ module Docs · 5 unmodified lines |
| 24 | end | 25 | end |
| 25 | end | 26 | end |
| 26 | | 27 | |
| 27 | css('h2').each do |node| | 28 | css('h2, h3').each do |node| |
| 28 | name = node.content.strip | 29 | name = node.content.strip |
| | 30 | next if name.match?(/\A-/) |
| 29 | next if name.in?(%w(Examples Getting\ Started Installation More\ Information Testing\ Mocha)) | 31 | next if name.in?(%w(Examples Getting\ Started Installation More\ Information Testing\ Mocha)) |
| 30 | name = 'mocha' if name == 'Usage' | | |
| 31 | entries << [name, node['id']] | 32 | entries << [name, node['id']] |
| 32 | end | 33 | end |
| 33 | | 34 | |