nu-plugin 0.112.2

Functionality for building Nushell plugins
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use nu_plugin_core::interface_test_util::TestCase;
use nu_plugin_protocol::{PluginInput, PluginOutput};

use crate::plugin::EngineInterfaceManager;

pub trait TestCaseExt {
    /// Create a new [`EngineInterfaceManager`] that writes to this test case.
    fn engine(&self) -> EngineInterfaceManager;
}

impl TestCaseExt for TestCase<PluginInput, PluginOutput> {
    fn engine(&self) -> EngineInterfaceManager {
        EngineInterfaceManager::new(self.clone())
    }
}