MCPcopy
hub / github.com/moonD4rk/HackBrowserData / TestWrite_JSON_NoBOM

Function TestWrite_JSON_NoBOM

output/output_test.go:214–226  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

212}
213
214func TestWrite_JSON_NoBOM(t *testing.T) {
215 dir := t.TempDir()
216 out, err := NewWriter(dir, "json")
217 require.NoError(t, err)
218 out.Add("Chrome", "Default", chromeData())
219 require.NoError(t, out.Write())
220
221 raw, err := os.ReadFile(filepath.Join(dir, "password.json"))
222 require.NoError(t, err)
223 if len(raw) >= 3 {
224 assert.NotEqual(t, utf8BOM, raw[:3], "JSON should NOT have BOM")
225 }
226}
227
228// --- CookieEditor output ---
229

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
WriteMethod · 0.95
NewWriterFunction · 0.85
chromeDataFunction · 0.85
TempDirMethod · 0.80

Tested by

no test coverage detected