           preview_length: -1,
           theme: "Serum.TestTheme"
         })
-
-      {:invalid, l} = validate(map)
+        |> validate()
 
       assert length(l) == 6
     end

      assert String.starts_with?(msg, "unknown properties:")
    end

    test "constraint check 1" do
      map = Map.put(@base_map, :base_url, "hello")
      {:invalid, l} = validate(map)

      assert length(l) == 1
    end

    test "constraint check 2" do
      map =
        Map.merge(@base_map, %{
          base_url: "hello",
          server_root: "htttps://foo.bar/baz",
          date_format: 3,

  }

  describe "validate/1" do
    test "validates a map containing required keys only" do
      assert :ok = validate(@base_map)
    end

    test "validates a map containing optional keys" do
      map =
        Map.merge(@base_map, %{
          server_root: "https://example.com/test",
