<commit_before>use kernel_micro::{include_file, MicroKernel};

pub fn new() -> MicroKernel {
    MicroKernel::new(
        "udeno",
        &["javascript", "typescript"],
        ("deno", ">1.7"),
        &["run", "--quiet", "--unstable", "{{script}}"],
        include_file!("deno-kernel.ts"),
        &[include_file!("deno-codec.ts")],
        "{{name}} = JSON.parse('{{json}}')",
        "{{name}}",
    )
}

#[cfg(test)]
mod tests {
    use super::*;
    use kernel::{eyre::Result, stencila_schema::Node, KernelTrait};
    use test_utils::{assert_json_eq, serde_json::json};

    /// Tests of basic functionality
    /// This test is replicated in all the microkernels.
    /// Other test should be written for language specific quirks and regressions.
    #[tokio::test]
    async fn basics() -> Result<()> {
        let mut kernel = new();
        if !kernel.available().await {<commit_msg>fix(Deno microkernel): FIx semver requirement<commit_after>use kernel_micro::{include_file, MicroKernel};

pub fn new() -> MicroKernel {
    MicroKernel::new(
        "udeno",
        &["javascript", "typescript"],
        ("deno", ">=1.7"),
        &["run", "--quiet", "--unstable", "{{script}}"],
        include_file!("deno-kernel.ts"),
        &[include_file!("deno-codec.ts")],
        "{{name}} = JSON.parse('{{json}}')",
        "{{name}}",
    )
}

#[cfg(test)]
mod tests {
    use super::*;
    use kernel::{eyre::Result, stencila_schema::Node, KernelTrait};
    use test_utils::{assert_json_eq, serde_json::json};

    /// Tests of basic functionality
    /// This test is replicated in all the microkernels.
    /// Other test should be written for language specific quirks and regressions.
    #[tokio::test]
    async fn basics() -> Result<()> {
        let mut kernel = new();
        if !kernel.available().await {
{'fraction_non_alphanumeric': 0.18958904109589042, 'fraction_numerical': 0.002191780821917808, 'mean_word_length': 2.9609544468546636, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5689463', 'n_tokens_mistral': 578, 'n_tokens_neox': 576, 'n_words': 140}