From e55b448730160a6e4df9815a268d4049ac89deab Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Fri, 17 Mar 2023 12:22:15 -0600 Subject: feat(core) deno_core::extension! macro to simplify extension registration (#18210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements: * `deno_core::ops!` registers a block of `#[op]`s, optionally with type parameters, useful for places where we share lists of ops * `deno_core::extension!` is used to register an extension, and creates two methods that can be used at runtime/snapshot generation time: `init_ops` and `init_ops_and_esm`. --------- Co-authored-by: Bartek IwaƄczuk --- cli/lsp/testing/execution.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cli/lsp/testing') diff --git a/cli/lsp/testing/execution.rs b/cli/lsp/testing/execution.rs index af890cc0d..ee182c690 100644 --- a/cli/lsp/testing/execution.rs +++ b/cli/lsp/testing/execution.rs @@ -165,7 +165,11 @@ async fn test_specifier( &ps, specifier.clone(), PermissionsContainer::new(permissions), - vec![ops::testing::init(sender, fail_fast_tracker, filter)], + vec![ops::testing::deno_test::init_ops( + sender, + fail_fast_tracker, + filter, + )], Stdio { stdin: StdioPipe::Inherit, stdout, -- cgit v1.2.3