From 84f9508813ac368bdce302db7f3a15bc6fce3fee Mon Sep 17 00:00:00 2001 From: Vika Date: Mon, 23 May 2022 08:54:42 +0300 Subject: templates: introduce unit tests These unit tests generate a random MF2-JSON post, convert it to MF2-HTML using the template and then read it back using the `microformats` crate. The only problem is that it has a nasty bug with overstuffing implied properties. This is being worked on: https://gitlab.com/maxburon/microformats-parser/-/issues/7 For now the tests marked as ignored because they fail. But the function itself that generates them should remain here for documentation and potential code sharing with the `microformats` crate, potentially even migrating to a subcrate there. --- Cargo.lock | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 77c6077..7b2bbef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1662,11 +1662,15 @@ version = "0.1.0" dependencies = [ "chrono", "ellipse", + "faker_rand", "http", "kittybox-util", "log 0.4.17", "markup", + "microformats", + "rand 0.8.5", "serde_json", + "test-logger", ] [[package]] -- cgit 1.4.1