@@ -31,7 +31,6 @@ import { |
31 | 31 | createAssetEnvironmentAtoms, |
32 | 32 | createProjectFaviconUrlAtomFamily, |
33 | 33 | makeRevisionedAssetUrlFamily, |
34 | | - projectFaviconResource, |
35 | 34 | } from "./assets.ts"; |
36 | 35 |
|
37 | 36 | describe("project favicon URL cache", () => { |
@@ -65,47 +64,6 @@ describe("project favicon URL cache", () => { |
65 | 64 | registry.dispose(); |
66 | 65 | } |
67 | 66 | }); |
68 | | - |
69 | | - it("resolves the icon again when its resource's URL query is refreshed", () => { |
70 | | - const registry = AtomRegistry.make(); |
71 | | - const answers = ["/api/assets/token/project-favicon-missing", "/api/assets/token/v1-icon.svg"]; |
72 | | - const query = Atom.family((key: string) => |
73 | | - Atom.make(() => |
74 | | - AsyncResult.success({ expiresAt: 4_000_000_000_000, relativeUrl: answers.shift()! }), |
75 | | - ).pipe(Atom.withLabel(key)), |
76 | | - ); |
77 | | - const createUrl = (target: { |
78 | | - readonly environmentId: EnvironmentId; |
79 | | - readonly input: { readonly resource: AssetResource }; |
80 | | - }) => query(JSON.stringify([target.environmentId, target.input.resource])); |
81 | | - const favicon = createProjectFaviconUrlAtomFamily({ |
82 | | - createUrl, |
83 | | - preparedConnection: () => Atom.make(Option.some({ httpBaseUrl: "https://remote.test" })), |
84 | | - }); |
85 | | - const target = { |
86 | | - environmentId: EnvironmentId.make("remote"), |
87 | | - cwd: "/workspace", |
88 | | - faviconPath: "icon.svg", |
89 | | - }; |
90 | | - const unmount = registry.mount(favicon(target)); |
91 | | - try { |
92 | | - expect(registry.get(favicon(target))).toBe( |
93 | | - "https://remote.test/api/assets/token/project-favicon-missing", |
94 | | - ); |
95 | | - registry.refresh( |
96 | | - createUrl({ |
97 | | - environmentId: target.environmentId, |
98 | | - input: { resource: projectFaviconResource(target.cwd, target.faviconPath) }, |
99 | | - }), |
100 | | - ); |
101 | | - expect(registry.get(favicon(target))).toBe( |
102 | | - "https://remote.test/api/assets/token/v1-icon.svg", |
103 | | - ); |
104 | | - } finally { |
105 | | - unmount(); |
106 | | - registry.dispose(); |
107 | | - } |
108 | | - }); |
109 | 67 | }); |
110 | 68 |
|
111 | 69 | /** |
|