<commit_before>(ns journal-creator.core-test
  (:require [clojure.test :refer :all]
            [journal-creator.core :refer :all]))

(deftest verify-day
  (testing "converting january and february to 13 and 14 respectively"
    (is (= 13 (convert-month 01)))
    (is (= 14 (convert-month 02)))
    (is (= 03 (convert-month 03))))

  (testing "Given a date, return a day of the week."
    (is (= "Monday"  (get-day-of-week 2014 3 3)))
    (is (= "Tuesday" (get-day-of-week 2011 8 2)))
    (is (= "Wednesday"(get-day-of-week 2017 3 1)))
    (is (= "Thursday" (get-day-of-week 2015 2 1)))
    (is (= "Friday" (get-day-of-week 2013 3 29)))
    (is (= "Sunday" (get-day-of-week 2012 3 18)))
    (is (= "Saturday" (get-day-of-week 2017 23 1)))
    (is (= "Sunday" (get-day-of-week 2015 4 26)))
    (is (= "Sunday" (get-day-of-week 2010 3 21)))))<commit_msg>fixing and adding tests around the journal-header format and filename extension format<commit_after>(ns journal-creator.core-test
  (:require [clojure.test :refer :all]
            [journal-creator.core :refer :all]
            [clj-time.core :as t]))

(deftest verify-utility-functions
  (testing "test get-journal-header return correct headers"
    (is (= (get-journal-header (t/date-time 2017 03 18))
           "= March 18, 2017, Saturday - <SUMMARY GOES HERE> =" ))
    (is (= (get-journal-header (t/date-time 2017 03))
           "= March 01, 2017, Wednesday - <SUMMARY GOES HERE> =" ))
    (is (= (get-journal-header (t/date-time 2017 12 18))
           "= December 18, 2017, Monday - <SUMMARY GOES HERE> =" )))

  (testing "test get-filename-extension returns correct format"
    (is (= (get-filename-extension (t/date-time 2017 3 18))  "2017-03-18.wiki"))
    (is (= (get-filename-extension (t/date-time 2014 2 8))   "2014-02-08.wiki"))
    (is (= (get-filename-extension (t/date-time 2027 1 1))   "2027-01-01.wiki"))
    (is (= (get-filename-extension (t/date-time 2017 12 14)) "2017-12-14.wiki")))

  (testing "test days-in-month returns correct count of days in the month"
    (is (= (count (days-in-month 2017 1)) 31))
    (is (= (count (days-in-month 2017 2)) 28))
    (is (= (count (days-in-month 2017 3)) 31))
    (is (= (count (days-in-month 2017 4)) 30))
    (is (= (count (days-in-month 2017 5)) 31))
    (is (= (count (days-in-month 2017 6)) 30))
    (is (= (count (days-in-month 2017 7)) 31))
    (is (= (count (days-in-month 2017 8)) 31))
    (is (= (count (days-in-month 2017 9)) 30))
    (is (= (count (days-in-month 2017 10)) 31))
    (is (= (count (days-in-month 2017 11)) 30))
    (is (= (count (days-in-month 2017 12)) 31))
))

{'fraction_non_alphanumeric': 0.1868047564250096, 'fraction_numerical': 0.1001150747986191, 'mean_word_length': 2.915915915915916, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '504739', 'n_tokens_mistral': 1222, 'n_tokens_neox': 917, 'n_words': 281}