feat: add CountEntries to skip decryption for list --detail (#562)

* feat: add CountEntries to skip decryption for list --detail (#549)
* test: add CountEntries and countCategory tests at browser level
* fix: address review feedback on CountRows and countLocalStorage
* test: add CountRows unit tests
This commit is contained in:
Roger
2026-04-07 22:28:39 +08:00
committed by GitHub
parent 5f42d4fe5f
commit b3bbc0dadf
40 changed files with 1009 additions and 101 deletions
+8
View File
@@ -141,6 +141,14 @@ func insertWebappsstore(originKey, key, value string) string {
// Test fixture builders
// ---------------------------------------------------------------------------
// installFile copies a test fixture file into a profile directory.
func installFile(t *testing.T, profileDir, srcPath, dstName string) {
t.Helper()
data, err := os.ReadFile(srcPath)
require.NoError(t, err)
require.NoError(t, os.WriteFile(filepath.Join(profileDir, dstName), data, 0o644))
}
func createTestDB(t *testing.T, name string, schemas []string, inserts ...string) string {
t.Helper()
path := filepath.Join(t.TempDir(), name)