Browse Source

Update Jest documentation (23.3.0)

Thibaut Courouble 7 years ago
parent
commit
8be51a5b36

+ 1 - 0
lib/docs/filters/jest/clean_html.rb

@@ -18,6 +18,7 @@ module Docs
         end
 
         css('pre').each do |node|
+          node['data-language'] = 'js'
           node['data-language'] = node['class'][/language-(\w+)/, 1] if node['class']
           node.content = node.content
         end

+ 1 - 1
lib/docs/filters/jest/entries.rb

@@ -6,7 +6,7 @@ module Docs
       end
 
       def get_type
-        type = at_css('.navItemActive').ancestors('.navGroup').first.at_css('h3').content
+        type = at_css('.navListItemActive').ancestors('.navGroup').first.at_css('h3').content
 
         if type == 'Introduction'
           'Guides: Introduction'

+ 3 - 3
lib/docs/scrapers/jest.rb

@@ -1,9 +1,9 @@
 module Docs
   class Jest < UrlScraper
     self.type = 'jest'
-    self.release = '23.1.0'
-    self.base_url = 'https://facebook.github.io/jest/docs/en/'
-    self.root_path = 'getting-started.html'
+    self.release = '23.3.0'
+    self.base_url = 'https://jestjs.io/docs/en/'
+    self.root_path = 'getting-started'
     self.links = {
       home: 'https://facebook.github.io/jest/',
       code: 'https://github.com/facebook/jest'