Browse Source

Add a new test

jherve 1 year ago
parent
commit
ae004cb6cf
3 changed files with 37 additions and 1 deletions
  1. 1 0
      src/LinkedIn/Profile/WorkExperience.purs
  2. 22 1
      test/ArtDecoCard.purs
  3. 14 0
      test/Utils.purs

+ 1 - 0
src/LinkedIn/Profile/WorkExperience.purs

@@ -28,6 +28,7 @@ data WorkExperience = WorkExperience {
 }
 
 derive instance Generic WorkExperience _
+derive instance Eq WorkExperience
 instance Show WorkExperience where
   show = genericShow
 

File diff suppressed because it is too large
+ 22 - 1
test/ArtDecoCard.purs


+ 14 - 0
test/Utils.purs

@@ -0,0 +1,14 @@
+module Test.Utils where
+
+import Prelude
+
+import Data.Date (Month)
+import Data.Int (toNumber)
+import Data.Maybe (fromJust)
+import LinkedIn.UIElements.Parser (toYear)
+import LinkedIn.UIElements.Types (MonthYear(..))
+import Partial.Unsafe (unsafePartial)
+
+toMonthYear' :: Month -> Int -> MonthYear
+toMonthYear' m y = MonthYear m y' where
+  y' = unsafePartial $ fromJust $ toYear $ toNumber y