Skip to content

add first class support for async testing without sleep #61

@prabirshrestha

Description

@prabirshrestha

Here is how most of javascript does this. They basically allows done argument in the test and the test framework checks the argument and if it has 1 arg it considers it as async.

https://jestjs.io/docs/en/asynchronous

test('the data is peanut butter', done => {
  function callback(data) {
    expect(data).toBe('peanut butter');
    done();
  }

  fetchData(callback);
});

Can we have something like this?

Async It should fetch data

call timer_start(5000, {t->Done()})

End

It does need to support default timeout and also allows us to specific custom timeouts which could be done by Async(10000) It should ...

This would make it easy to test async parts of vim-lsp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions