Update mocha to 8.2.1

pull/1321/head
MasterEnoc 4 years ago
parent 674dc1e35c
commit 4edc80541b

@ -9,6 +9,13 @@ module Docs
node['data-language'] = 'javascript' node['data-language'] = 'javascript'
end end
css('#more-information ~ p').remove
css('#more-information').remove
css('h2 > a, h3 > a').each do |node|
node.remove
end
doc doc
end end
end end

@ -9,10 +9,11 @@ module Docs
'bdd' => ['describe()', 'context()', 'it()', 'specify()'], 'bdd' => ['describe()', 'context()', 'it()', 'specify()'],
'tdd' => ['suite()', 'test()'], 'tdd' => ['suite()', 'test()'],
'exports' => ['exports'], 'exports' => ['exports'],
'qunit' => ['QUnit'],
'require' => ['require'], 'require' => ['require'],
'browser-specific-methods' => ['mocha.allowUncaught()', 'mocha.setup()', 'mocha.run()', 'mocha.globals()', 'mocha.checkLeaks()'], 'running-mocha-in-the-browser' => ['mocha.setup()', 'mocha.run()', 'mocha.globals()', 'mocha.checkLeaks()'],
'timeouts' => ['timeout()'] 'timeouts' => ['timeout()'],
'delayed-root-suite' => ['run()'],
'command-line-usage' => ['mocha cli options']
} }
def additional_entries def additional_entries
@ -24,10 +25,10 @@ module Docs
end end
end end
css('h2').each do |node| css('h2, h3').each do |node|
name = node.content.strip name = node.content.strip
next if name.match?(/\A-/)
next if name.in?(%w(Examples Getting\ Started Installation More\ Information Testing\ Mocha)) next if name.in?(%w(Examples Getting\ Started Installation More\ Information Testing\ Mocha))
name = 'mocha' if name == 'Usage'
entries << [name, node['id']] entries << [name, node['id']]
end end

@ -1,7 +1,7 @@
module Docs module Docs
class Mocha < UrlScraper class Mocha < UrlScraper
self.type = 'simple' self.type = 'simple'
self.release = '5.2.0' self.release = '8.2.1'
self.base_url = 'https://mochajs.org/' self.base_url = 'https://mochajs.org/'
self.links = { self.links = {
home: 'https://mochajs.org/', home: 'https://mochajs.org/',
@ -15,7 +15,7 @@ module Docs
options[:skip_links] = true options[:skip_links] = true
options[:attribution] = <<-HTML options[:attribution] = <<-HTML
&copy; 2011&ndash;2018 JS Foundation and contributors<br> &copy; 2011&ndash;2020 JS Foundation and contributors<br>
Licensed under the Creative Commons Attribution 4.0 International License. Licensed under the Creative Commons Attribution 4.0 International License.
HTML HTML

Loading…
Cancel
Save