mirror of
https://github.com/moonD4rk/HackBrowserData
synced 2024-12-23 22:32:11 +00:00
536f2082f9
* refactor: Refactor package names and imports for better code organization. * refactor: Package imports and variable types for consistency * chore: Disable unused-parameter rule in revive. * refactor: Refactor and organize data extraction and browserdata parse. * fix: rename wrong error message info
24 lines
424 B
Go
24 lines
424 B
Go
package browserdata
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestNewOutPutter(t *testing.T) {
|
|
t.Parallel()
|
|
out := newOutPutter("json")
|
|
if out == nil {
|
|
t.Error("New() returned nil")
|
|
}
|
|
f, err := out.CreateFile("results", "test.json")
|
|
if err != nil {
|
|
t.Error("CreateFile() returned an error", err)
|
|
}
|
|
defer os.RemoveAll("results")
|
|
err = out.Write(nil, f)
|
|
if err != nil {
|
|
t.Error("Write() returned an error", err)
|
|
}
|
|
}
|