mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 22:40:33 +00:00
♻️ Drop the dead requires and bindings the linter flags
Three requires nobody reads (`app.common.uuid` in the consumer worker, `app.common.exceptions` in the api test, `node:path` in the worker test), the `original-fetch`/`original-render` vars left over from before the fakes returned their own restore thunks, and the `port` and `terminated` atoms no test ever reads. AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
parent
42cd7d6f9e
commit
ade36617b3
@ -23,7 +23,6 @@
|
||||
(:require
|
||||
["ioredis" :as redis]
|
||||
[app.common.logging :as l]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
[app.consumer.api :as api]
|
||||
[app.consumer.config :as ccfg]
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
["node:fs/promises" :as fsp]
|
||||
["node:path" :as path]
|
||||
["undici" :as http]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.transit :as transit]
|
||||
[app.common.uuid :as uuid]
|
||||
[app.config :as cf]
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
business in devenv; this harness pins the shapes the worker owns."
|
||||
(:require
|
||||
["node:fs/promises" :as fsp]
|
||||
["node:path" :as path]
|
||||
["undici" :as http]
|
||||
[app.common.exceptions :as ex]
|
||||
[app.common.transit :as transit]
|
||||
@ -27,8 +26,6 @@
|
||||
|
||||
;; ---- THE MANAGEMENT FAKE
|
||||
|
||||
(def ^:private original-fetch api/fetch)
|
||||
|
||||
(def ^:private calls
|
||||
"One entry per management call: [method, body]."
|
||||
(atom []))
|
||||
@ -73,8 +70,6 @@
|
||||
|
||||
;; ---- THE RD FAKE
|
||||
|
||||
(def ^:private original-render rd/render)
|
||||
|
||||
(defn- fake-render
|
||||
"Installs a fake renderer that writes one file of `content` per
|
||||
object and calls back with it. When `captured` is an atom, it also
|
||||
@ -334,7 +329,6 @@
|
||||
sid (uuid/next)
|
||||
params (export-params)
|
||||
stages (volatile! [])
|
||||
port (atom 0)
|
||||
fetch-restore (fake-fetch
|
||||
(fn [method body]
|
||||
(when (= "report-job-progress" method)
|
||||
@ -361,7 +355,6 @@
|
||||
sid (uuid/next)
|
||||
params (export-params)
|
||||
stages (volatile! [])
|
||||
terminated (atom 0)
|
||||
fetch-restore (fake-fetch
|
||||
(fn [method body]
|
||||
(when (= "report-job-progress" method)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user