From 8ddd54fc8c76a2d30f225110918f16448f559b1f Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 28 Oct 2021 23:12:40 +0200 Subject: [PATCH] add tests --- cmd/main_test.go | 18 ++++++++++++++++++ pkg/commands/commands_test.go | 18 ++++++++++++++++++ pkg/handlers/handlers_test.go | 19 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 cmd/main_test.go create mode 100644 pkg/commands/commands_test.go create mode 100644 pkg/handlers/handlers_test.go diff --git a/cmd/main_test.go b/cmd/main_test.go new file mode 100644 index 0000000..7100647 --- /dev/null +++ b/cmd/main_test.go @@ -0,0 +1,18 @@ +package main + +import "testing" + +func TestMain(t *testing.T) { + t.Run("main package test placeholder", func(t *testing.T) { + request := 1 + response := 1 + + got := request + want := response + + if got != want { + t.Errorf("got %q, want %q", got, want) + } + + }) +} diff --git a/pkg/commands/commands_test.go b/pkg/commands/commands_test.go new file mode 100644 index 0000000..9abc549 --- /dev/null +++ b/pkg/commands/commands_test.go @@ -0,0 +1,18 @@ +package commands + +import "testing" + +func TestCommands(t *testing.T) { + t.Run("commands package test placeholder", func(t *testing.T) { + request := 1 + response := 1 + + got := request + want := response + + if got != want { + t.Errorf("got %q, want %q", got, want) + } + + }) +} diff --git a/pkg/handlers/handlers_test.go b/pkg/handlers/handlers_test.go new file mode 100644 index 0000000..f36492f --- /dev/null +++ b/pkg/handlers/handlers_test.go @@ -0,0 +1,19 @@ +package handlers + +import "testing" + +// Idk how to test this really we don't return anything +func TestHandlers(t *testing.T) { + t.Run("handlers package test placeholder", func(t *testing.T) { + request := 1 + response := 1 + + got := request + want := response + + if got != want { + t.Errorf("got %q, want %q", got, want) + } + + }) +}