summaryrefslogtreecommitdiff
path: root/ops/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-11-25 06:47:21 -0800
committerGitHub <noreply@github.com>2022-11-25 20:17:21 +0530
commit8fc62f93bfeb63edf2ee875ee5d4f8b63728f838 (patch)
treee97e0931ac40bc4454a17b7b6717ed522e2fac9a /ops/lib.rs
parentd80af8324d61ce6fa54f6c9c4a2658c18b9c2428 (diff)
fix(ops): circular dependency in deno_ops test (#16809)
Diffstat (limited to 'ops/lib.rs')
-rw-r--r--ops/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/ops/lib.rs b/ops/lib.rs
index 4d0c89bd2..efd47f8e5 100644
--- a/ops/lib.rs
+++ b/ops/lib.rs
@@ -17,9 +17,6 @@ mod deno;
mod fast_call;
mod optimizer;
-#[cfg(test)]
-mod tests;
-
const SCOPE_LIFETIME: &str = "'scope";
/// Add the 'scope lifetime to the function signature.
@@ -60,6 +57,10 @@ impl Op {
let is_async = item.sig.asyncness.is_some() || is_future(&item.sig.output);
let type_params = exclude_lifetime_params(&item.sig.generics.params);
+
+ #[cfg(test)]
+ let core = quote!(deno_core);
+ #[cfg(not(test))]
let core = deno::import();
Self {