MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / readBackgroundDiagnostics

Function readBackgroundDiagnostics

e2e/background-script.spec.ts:97–108  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

95}
96
97async function readBackgroundDiagnostics(page: Page): Promise<any> {
98 return page.evaluate(() => {
99 return new Promise((resolve) => {
100 chrome.storage.local.get(null, (all) => {
101 const scripts = Object.fromEntries(
102 Object.entries(all).filter(([key]) => key.startsWith("script:") || key.startsWith("code:"))
103 );
104 resolve({ scripts });
105 });
106 });
107 });
108}
109
110test.describe("Background script offscreen path (#1457)", () => {
111 test("@background 脚本在 Chrome offscreen 路径下执行完成并具备 DOM 环境", async ({ context, extensionId }) => {

Callers 1

Calls 2

entriesMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected