nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.22k stars 107 forks source link

[BUG] Test that runs in DAP strategy never finishes #200

Open sidlatau opened 1 year ago

sidlatau commented 1 year ago

NeoVim Version Output of nvim --version

NVIM v0.9.0-dev-3366+gc752c8536-dirty
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by ts@Tautvydass-MacBook-Air.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/HEAD-c752c85/share/nvim"

Run :checkhealth for more info

Describe the bug I run flutter test with DAP configuration. Test starts, I am able to stop on the breakpoint, bet when continuing (or not adding any breakpoint) test visually never stops - I always see "in progress" icon both in signcolumn and in neotest summary window.

To Reproduce Please provide a minimal init.lua to reproduce which can be run as the following:

nvim --clean -u minimal.lua
minimal.lua ```lua -- ignore default config and plugins vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim")) vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site")) vim.opt.termguicolors = true -- append test directory local test_dir = "/tmp/nvim-config" vim.opt.runtimepath:append(vim.fn.expand(test_dir)) vim.opt.packpath:append(vim.fn.expand(test_dir)) -- install packer local install_path = test_dir .. "/pack/packer/start/packer.nvim" local install_plugins = false if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path) vim.cmd("packadd packer.nvim") install_plugins = true end local packer = require("packer") packer.init({ package_root = test_dir .. "/pack", compile_path = test_dir .. "/plugin/packer_compiled.lua", }) packer.startup(function(use) use("wbthomason/packer.nvim") use({ "mfussenegger/nvim-dap" }) use({ "nvim-neotest/neotest", requires = { "vim-test/vim-test", "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "antoinemadec/FixCursorHold.nvim", "sidlatau/neotest-dart", }, config = function() require("neotest").setup({ adapters = { require("neotest-dart")({ command = "flutter", }), }, output = { open_on_run = false, }, discovery = { enabled = false, }, diagnostic = { enabled = true, }, floating = { border = "rounded", max_height = 0.8, max_width = 0.8, options = {}, }, quickfix = { enabled = false, }, log_level = vim.log.levels.DEBUG, }) end, }) if install_plugins then packer.sync() end end) vim.cmd([[ command! NeotestSummary lua require("neotest").summary.toggle() command! NeotestFile lua require("neotest").run.run(vim.fn.expand("%")) command! Neotest lua require("neotest").run.run(vim.fn.getcwd()) command! NeotestNearest lua require("neotest").run.run() command! NeotestDebug lua require("neotest").run.run({ strategy = "dap" }) command! NeotestAttach lua require("neotest").run.attach() command! NeotestOutput lua require("neotest").output.open() ]]) ```

Steps to reproduce the behavior:

  1. Install flutter
  2. Generate example app flutter create .
  3. Open neovim with provided minimum configuration.
  4. Open test file :e test/widget_test.dart
  5. When cursor is on test run ":NeotestDebug"
  6. Notice that test starts, but never ends.

Expected behavior Test end should get success status.

Logs

  1. Wipe the neotest.log file in stdpath("log") or stdpath("data").
  2. Set log_level = vim.log.levels.DEBUG in your neotest setup config.
  3. Reproduce the issue.
  4. Provide the new logs.
    Logs
INFO | 2023-01-27T22:15:43Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/config/init.lua:298 | Configuration complete
DEBUG | 2023-01-27T22:15:43Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/config/init.lua:299 | User config {
  adapters = { {
      build_spec = <function 1>,
      discover_positions = <function 2>,
      is_test_file = <function 3>,
      name = "neotest-dart",
      results = <function 4>,
      root = <function 5>,
      <metatable> = {
        __call = <function 6>
      }
    } },
  benchmark = {
    enabled = true
  },
  consumers = {},
  default_strategy = "integrated",
  diagnostic = {
    enabled = true,
    severity = 1
  },
  discovery = {
    concurrent = 12,
    enabled = false
  },
  floating = {
    border = "rounded",
    max_height = 0.8,
    max_width = 0.8,
    options = {}
  },
  highlights = {
    adapter_name = "NeotestAdapterName",
    border = "NeotestBorder",
    dir = "NeotestDir",
    expand_marker = "NeotestExpandMarker",
    failed = "NeotestFailed",
    file = "NeotestFile",
    focused = "NeotestFocused",
    indent = "NeotestIndent",
    marked = "NeotestMarked",
    namespace = "NeotestNamespace",
    passed = "NeotestPassed",
    running = "NeotestRunning",
    select_win = "NeotestWinSelect",
    skipped = "NeotestSkipped",
    target = "NeotestTarget",
    test = "NeotestTest",
    unknown = "NeotestUnknown"
  },
  icons = {
    child_indent = "│",
    child_prefix = "├",
    collapsed = "─",
    expanded = "╮",
    failed = "",
    final_child_indent = " ",
    final_child_prefix = "╰",
    non_collapsible = "─",
    passed = "",
    running = "",
    running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
    skipped = "",
    unknown = ""
  },
  jump = {
    enabled = true
  },
  log_level = 1,
  output = {
    enabled = true,
    open_on_run = false
  },
  output_panel = {
    enabled = true,
    open = "botright split | resize 15"
  },
  projects = {
    <metatable> = {
      __index = <function 7>
    }
  },
  quickfix = {
    enabled = false,
    open = true
  },
  run = {
    enabled = true
  },
  running = {
    concurrent = true
  },
  status = {
    enabled = true,
    signs = true,
    virtual_text = false
  },
  strategies = {
    integrated = {
      height = 40,
      width = 120
    }
  },
  summary = {
    animated = true,
    enabled = true,
    expand_errors = true,
    follow = true,
    mappings = {
      attach = "a",
      clear_marked = "M",
      clear_target = "T",
      debug = "d",
      debug_marked = "D",
      expand = { "<CR>", "<2-LeftMouse>" },
      expand_all = "e",
      jumpto = "i",
      mark = "m",
      next_failed = "J",
      output = "o",
      prev_failed = "K",
      run = "r",
      run_marked = "R",
      short = "O",
      stop = "u",
      target = "t"
    },
    open = "botright vsplit | vertical resize 50"
  }
}
INFO | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:32 | Starting child process
INFO | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:35 | Parent address: localhost:53934
INFO | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:41 | Starting child process with command: /opt/homebrew/Cellar/neovim/HEAD-c752c85/bin/nvim --embed --headless
INFO | 2023-01-27T22:16:03Z+0200 | ...te/pack/packer/start/neotest/lua/neotest/config/init.lua:298 | Configuration complete
DEBUG | 2023-01-27T22:16:03Z+0200 | ...te/pack/packer/start/neotest/lua/neotest/config/init.lua:299 | User config {
  adapters = { {
      build_spec = <function 1>,
      discover_positions = <function 2>,
      is_test_file = <function 3>,
      name = "neotest-dart",
      results = <function 4>,
      root = <function 5>,
      <metatable> = {
        __call = <function 6>
      }
    }, {
      build_spec = <function 7>,
      discover_positions = <function 8>,
      is_test_file = <function 9>,
      name = "neotest-plenary",
      results = <function 10>,
      root = <function 11>,
      <metatable> = {
        __call = <function 12>
      }
    } },
  benchmark = {
    enabled = true
  },
  consumers = {},
  default_strategy = "integrated",
  diagnostic = {
    enabled = true,
    severity = 1
  },
  discovery = {
    concurrent = 12,
    enabled = false
  },
  floating = {
    border = "rounded",
    max_height = 0.8,
    max_width = 0.8,
    options = {}
  },
  highlights = {
    adapter_name = "NeotestAdapterName",
    border = "NeotestBorder",
    dir = "NeotestDir",
    expand_marker = "NeotestExpandMarker",
    failed = "NeotestFailed",
    file = "NeotestFile",
    focused = "NeotestFocused",
    indent = "NeotestIndent",
    marked = "NeotestMarked",
    namespace = "NeotestNamespace",
    passed = "NeotestPassed",
    running = "NeotestRunning",
    select_win = "NeotestWinSelect",
    skipped = "NeotestSkipped",
    target = "NeotestTarget",
    test = "NeotestTest",
    unknown = "NeotestUnknown"
  },
  icons = {
    child_indent = "│",
    child_prefix = "├",
    collapsed = "─",
    expanded = "╮",
    failed = "",
    final_child_indent = " ",
    final_child_prefix = "╰",
    non_collapsible = "─",
    passed = "",
    running = "",
    running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
    skipped = "",
    unknown = ""
  },
  jump = {
    enabled = true
  },
  log_level = 1,
  output = {
    enabled = true,
    open_on_run = false
  },
  output_panel = {
    enabled = true,
    open = "botright split | resize 15"
  },
  projects = {
    <metatable> = {
      __index = <function 13>
    }
  },
  quickfix = {
    enabled = false,
    open = true
  },
  run = {
    enabled = true
  },
  running = {
    concurrent = true
  },
  status = {
    enabled = true,
    signs = true,
    virtual_text = false
  },
  strategies = {
    integrated = {
      height = 40,
      width = 120
    }
  },
  summary = {
    animated = true,
    enabled = true,
    expand_errors = true,
    follow = true,
    mappings = {
      attach = "a",
      clear_marked = "M",
      clear_target = "T",
      debug = "d",
      debug_marked = "D",
      expand = { "<CR>", "<2-LeftMouse>" },
      expand_all = "e",
      jumpto = "i",
      mark = "m",
      next_failed = "J",
      output = "o",
      prev_failed = "K",
      run = "r",
      run_marked = "R",
      short = "O",
      stop = "u",
      target = "t"
    },
    open = "botright vsplit | vertical resize 50"
  }
}
INFO | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:82 | CHILD | Connected to parent instance
INFO | 2023-01-27T22:16:03Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/client/init.lua:379 | Initialising client
INFO | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting starting event
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener run for event starting
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event starting
INFO | 2023-01-27T22:16:03Z+0200 | .../pack/packer/start/neotest/lua/neotest/adapters/init.lua:18 | Found 0 adapters for directory /Users/ts/Documents/github/personal/tmp/neotest_dap_problem
DEBUG | 2023-01-27T22:16:03Z+0200 | .../pack/packer/start/neotest/lua/neotest/adapters/init.lua:19 | Adapters: {}
INFO | 2023-01-27T22:16:03Z+0200 | .../pack/packer/start/neotest/lua/neotest/adapters/init.lua:50 | Adapter neotest-dart matched buffer /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart
INFO | 2023-01-27T22:16:03Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/client/init.lua:300 | Parsing /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart
DEBUG | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:132 | Waiting for result 1
INFO | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:145 | CHILD | Received remote call 1 <function 1>
DEBUG | 2023-01-27T22:16:03Z+0200 | .../pack/packer/start/neotest/lua/neotest/lib/file/init.lua:22 | CHILD | Reading file: /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart
DEBUG | 2023-01-27T22:16:03Z+0200 | ...pack/packer/start/neotest/lua/neotest/lib/subprocess.lua:87 | Result registed for callback 1
DEBUG | 2023-01-27T22:16:03Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/client/init.lua:306 | Found { {
    id = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart",
    name = "widget_test.dart",
    path = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart",
    range = { 0, 0, 30, 0 },
    type = "file"
  }, { {
      id = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart::'Counter increments smoke test'",
      name = "Counter increments smoke test",
      path = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart",
      range = { 13, 2, 28, 5 },
      type = "test"
    } } }
DEBUG | 2023-01-27T22:16:03Z+0200 | ...k/packer/start/neotest/lua/neotest/client/state/init.lua:54 | New positions at ID /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart
INFO | 2023-01-27T22:16:03Z+0200 | ...k/packer/start/neotest/lua/neotest/client/state/init.lua:57 | File discovered without root, using cwd /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart
INFO | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting discover_positions event
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event discover_positions
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event discover_positions
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event discover_positions
INFO | 2023-01-27T22:16:03Z+0200 | ...ig/pack/packer/start/neotest/lua/neotest/client/init.lua:480 | Initialisation finished in 0.011 seconds
INFO | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting test_file_focused event
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event test_file_focused
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event test_file_focused
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event test_file_focused
INFO | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting started event
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event started
DEBUG | 2023-01-27T22:16:03Z+0200 | ...k/packer/start/neotest/lua/neotest/client/state/init.lua:85 | Setting positions to running /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart::'Counter increments smoke test'
INFO | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting run event
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event run
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event run
DEBUG | 2023-01-27T22:16:03Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event run
INFO | 2023-01-27T22:16:03Z+0200 | ...ker/start/neotest/lua/neotest/client/strategies/init.lua:32 | Starting process neotest-dart:/Users/ts/Documents/github/personal/tmp/neotest_dap_problem-/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart::'Counter increments smoke test' with strategy dap
DEBUG | 2023-01-27T22:16:03Z+0200 | ...ker/start/neotest/lua/neotest/client/strategies/init.lua:33 | Strategy spec {
  command = "fvm flutter test /Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart --plain-name Counter increments smoke test --reporter json",
  context = {
    file = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart",
    results_path = "/var/folders/yr/hcbxjx753jn_kxwv57cg5nqm0000gn/T/nvim.ts/IHAIOF/0"
  },
  strategy = {
    args = { "--plain-name", "Counter increments smoke test" },
    name = "Neotest Debugger",
    program = "/Users/ts/Documents/github/personal/tmp/neotest_dap_problem/test/widget_test.dart",
    request = "launch",
    type = "dart_test"
  },
  stream = <function 1>
}
DEBUG | 2023-01-27T22:16:05Z+0200 | ...k/packer/start/neotest/lua/neotest/client/state/init.lua:70 | New results for adapter neotest-dart:/Users/ts/Documents/github/personal/tmp/neotest_dap_problem
INFO | 2023-01-27T22:16:05Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:48 | Emitting results event
DEBUG | 2023-01-27T22:16:05Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener diagnostic for event results
DEBUG | 2023-01-27T22:16:05Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener summary for event results
DEBUG | 2023-01-27T22:16:05Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener output_panel for event results
DEBUG | 2023-01-27T22:16:05Z+0200 | .../packer/start/neotest/lua/neotest/client/events/init.lua:50 | Calling listener status for event results
INFO | 2023-01-27T22:16:17Z+0200 | ...te/pack/packer/start/neotest/lua/neotest/config/init.lua:298 | Configuration complete
DEBUG | 2023-01-27T22:16:17Z+0200 | ...te/pack/packer/start/neotest/lua/neotest/config/init.lua:299 | User config {
  adapters = { {
      build_spec = <function 1>,
      discover_positions = <function 2>,
      is_test_file = <function 3>,
      name = "neotest-dart",
      results = <function 4>,
      root = <function 5>,
      <metatable> = {
        __call = <function 6>
      }
    }, {
      build_spec = <function 7>,
      discover_positions = <function 8>,
      is_test_file = <function 9>,
      name = "neotest-plenary",
      results = <function 10>,
      root = <function 11>,
      <metatable> = {
        __call = <function 12>
      }
    } },
  benchmark = {
    enabled = true
  },
  consumers = {},
  default_strategy = "integrated",
  diagnostic = {
    enabled = true,
    severity = 1
  },
  discovery = {
    concurrent = 12,
    enabled = false
  },
  floating = {
    border = "rounded",
    max_height = 0.8,
    max_width = 0.8,
    options = {}
  },
  highlights = {
    adapter_name = "NeotestAdapterName",
    border = "NeotestBorder",
    dir = "NeotestDir",
    expand_marker = "NeotestExpandMarker",
    failed = "NeotestFailed",
    file = "NeotestFile",
    focused = "NeotestFocused",
    indent = "NeotestIndent",
    marked = "NeotestMarked",
    namespace = "NeotestNamespace",
    passed = "NeotestPassed",
    running = "NeotestRunning",
    select_win = "NeotestWinSelect",
    skipped = "NeotestSkipped",
    target = "NeotestTarget",
    test = "NeotestTest",
    unknown = "NeotestUnknown"
  },
  icons = {
    child_indent = "│",
    child_prefix = "├",
    collapsed = "─",
    expanded = "╮",
    failed = "",
    final_child_indent = " ",
    final_child_prefix = "╰",
    non_collapsible = "─",
    passed = "",
    running = "",
    running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
    skipped = "",
    unknown = ""
  },
  jump = {
    enabled = true
  },
  log_level = 1,
  output = {
    enabled = true,
    open_on_run = false
  },
  output_panel = {
    enabled = true,
    open = "botright split | resize 15"
  },
  projects = {
    <metatable> = {
      __index = <function 13>
    }
  },
  quickfix = {
    enabled = false,
    open = true
  },
  run = {
    enabled = true
  },
  running = {
    concurrent = true
  },
  status = {
    enabled = true,
    signs = true,
    virtual_text = false
  },
  strategies = {
    integrated = {
      height = 40,
      width = 120
    }
  },
  summary = {
    animated = true,
    enabled = true,
    expand_errors = true,
    follow = true,
    mappings = {
      attach = "a",
      clear_marked = "M",
      clear_target = "T",
      debug = "d",
      debug_marked = "D",
      expand = { "<CR>", "<2-LeftMouse>" },
      expand_all = "e",
      jumpto = "i",
      mark = "m",
      next_failed = "J",
      output = "o",
      prev_failed = "K",
      run = "r",
      run_marked = "R",
      short = "O",
      stop = "u",
      target = "t"
    },
    open = "botright vsplit | vertical resize 50"
  }
}

Additional context I am author of neotest-dart adapter. Not sure where is the problem - if it is in the adapter, I will gladly fix it. But I do not see any interfaces for finishing test from adapter.

rcarriga commented 1 year ago

Haven't had a chance to install flutter and test but my initial thought is that the debugger doesn't emit an exited event which is used to collect the exit code. Can you verify? https://github.com/nvim-neotest/neotest/blob/392808a91d6ee28d27cbfb93c9fd9781759b5d00/lua/neotest/client/strategies/dap/init.lua#L47-L52

sidlatau commented 1 year ago

I added logging:

    before = function(config)
      dap.listeners.after.event_output[handler_id] = function(_, body)
        vim.pretty_print("output-------", body)
        if vim.tbl_contains({ "stdout", "stderr" }, body.category) then
          async.run(function()
            data_accum:push(body.output)
          end)
        end
      end
      dap.listeners.after.event_exited[handler_id] = function(_, info)
        vim.pretty_print("exit----------", info)
        result_code = info.exitCode
        async.run(function()
          pcall(finish_cond.notify_all, finish_cond)
        end)
      end

      return adapter_before and adapter_before() or config
    end,
    after = function()
      vim.pretty_print("after----------")
      dap.listeners.after.event_output[handler_id] = nil
      if adapter_after then
        adapter_after()
      end
    end,

Here is the output:

"output-------"    {                                                                                                                                                     
  category = "stdout",                                                                                                                                                   
  output = "\n"                                                                                                                                                          
}                                                                                                                                                                        
"output-------"    {                                                                                                                                                     
  category = "console",                                                                                                                                                  
  output = "Connecting to VM Service at ws://127.0.0.1:57252/cyQJoBnVwn0=/ws\n"                                                                                          
}                                                                                                                                                                        
"output-------"    {                                                                                                                                                     
  category = "console",                                                                                                                                                  
  output = '✓ Help page press "send device data" tile - confirmation dialog shown\n'                                                                                     
}                                                                                                                                                                        
"output-------"    {                                                                                                                                                     
  output = "\nExited."                                                                                                                                                   
}                                                                                                                                                                        
"after----------"           

So yes, there is no exited event emitted. But I see after callback is called - maybe at that point we can somehow indicate, that test finished?

rcarriga commented 1 year ago

I've handled an exit event not being emitted and defaulted the exit code to 0, so it'll be up to the adapter to handle no exit code which I imagine is relatively easy if not already handled.