From ac9fa998dd9e256ff15ded352eeda1598ed439c0 Mon Sep 17 00:00:00 2001 From: Zoltan Toth Date: Sun, 28 Apr 2019 15:59:38 -0400 Subject: [PATCH] Prioritize ES6 example on pattern page --- .../__snapshots__/Pattern.test.js.snap | 100 +++++++++--------- .../pages/__snapshots__/Patterns.test.js.snap | 100 +++++++++--------- src/components/Pattern.jsx | 8 +- 3 files changed, 104 insertions(+), 104 deletions(-) diff --git a/__tests__/components/__snapshots__/Pattern.test.js.snap b/__tests__/components/__snapshots__/Pattern.test.js.snap index 681190e..f64f915 100644 --- a/__tests__/components/__snapshots__/Pattern.test.js.snap +++ b/__tests__/components/__snapshots__/Pattern.test.js.snap @@ -74,7 +74,7 @@ exports[`REFERENCE - Pattern component renders the individual pattern (Singleton .

- ES5 + ES6

-          function
+          class
         
          
         
           Person
         
-        (
-        
-        ) 
+         
       
       {
   
+      
+        constructor
+      
+      () {
+    
       
         'object'
       
-      ) 
+      ) {
+      
       
        Person.instance;
+    }
 
-  Person.instance = 
+    Person.instance = 
       
       ;
 
-  
+    
       
       ;
+  }
 }
 
 
       
-        module
+        export
       
-      .exports = Person;
+       
+      
+        default
+      
+       Person;
     
   

- ES6 + ES5

-          class
+          function
         
          
         
           Person
         
-         
+        (
+        
+        ) 
       
       {
   
-      
-        constructor
-      
-      () {
-    
       
         'object'
       
-      ) {
-      
+      ) 
       
        Person.instance;
-    }
 
-    Person.instance = 
+  Person.instance = 
       
       ;
 
-    
+  
       
       ;
-  }
 }
 
 
       
-        export
-      
-       
-      
-        default
+        module
       
-       Person;
+      .exports = Person;
     
   
diff --git a/__tests__/pages/__snapshots__/Patterns.test.js.snap b/__tests__/pages/__snapshots__/Patterns.test.js.snap index b4570ec..eb28cce 100644 --- a/__tests__/pages/__snapshots__/Patterns.test.js.snap +++ b/__tests__/pages/__snapshots__/Patterns.test.js.snap @@ -310,7 +310,7 @@ exports[`Patterns page renders the individual Pattern (Singleton) info 1`] = ` .

- ES5 + ES6

-          function
+          class
         
          
         
           Person
         
-        (
-        
-        ) 
+         
       
       {
   
+      
+        constructor
+      
+      () {
+    
       
         'object'
       
-      ) 
+      ) {
+      
       
        Person.instance;
+    }
 
-  Person.instance = 
+    Person.instance = 
       
       ;
 
-  
+    
       
       ;
+  }
 }
 
 
       
-        module
+        export
       
-      .exports = Person;
+       
+      
+        default
+      
+       Person;
     
   

- ES6 + ES5

-          class
+          function
         
          
         
           Person
         
-         
+        (
+        
+        ) 
       
       {
   
-      
-        constructor
-      
-      () {
-    
       
         'object'
       
-      ) {
-      
+      ) 
       
        Person.instance;
-    }
 
-    Person.instance = 
+  Person.instance = 
       
       ;
 
-    
+  
       
       ;
-  }
 }
 
 
       
-        export
-      
-       
-      
-        default
+        module
       
-       Person;
+      .exports = Person;
     
   
diff --git a/src/components/Pattern.jsx b/src/components/Pattern.jsx index 59940f8..b4bf1a4 100644 --- a/src/components/Pattern.jsx +++ b/src/components/Pattern.jsx @@ -83,14 +83,14 @@ class Pattern extends React.Component {

)} -

ES5

+

ES6

- {pattern.codeES5} + {pattern.codeES6} -

ES6

+

ES5

- {pattern.codeES6} + {pattern.codeES5} )}