JohnnyMorganz / luau-lsp

Language Server Implementation for Luau
MIT License
226 stars 58 forks source link

Add tests for the server #592

Open JohnnyMorganz opened 5 months ago

JohnnyMorganz commented 5 months ago

One thing this project is severely lacking is test cases. This primarily stems from the fact that the structure to build test cases is not simple, creating a barrier to entry to writing these cases.

We should invest some time into improving the test fixtures for testing, so that it is easier to write tests. And then, write some common test cases we are missing (Maybe go back and find bugs to add regression tests for?).

It would be nice to research what other language servers are doing to support testing.

Some particular areas we really should be testing:

We could also write a few E2E integration tests with JSON input and output. Probably better to minimise these if possible.

JohnnyMorganz commented 3 months ago

Bugs that would be useful to test for: #641, #634

The main thing that is missing is scaffolding to perform tests that rely on multiple files, required files, or sourcemaps. Once we get something sorted for that, we are golden