Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Conversation

@jozefs
Copy link

@jozefs jozefs commented Apr 25, 2020

This series of commits:

  1. Migrates the testing infrastructure to vscode-test. The changes follow practices set by Microsoft's current sample code.

    The tests are set up to be written in TypeScript, however the production code is left as JavaScript.

  2. Fixes linting errors in existing code found by the new npm lint task added in the commit above.

  3. And finally, the duplicated front matter parsing code is extracted into its own class. Its behaviour is covered by unit tests. The new parsing code fixes front-matter parsing causes error and high cpu utilization #77.

Assuming that this approach is acceptable, I'll continue refactoring the code to make it more testable and writing tests. These changes will make it easier and safer to add new features in the future.

Ideally I'd like to start using TypeScript in the production code as well to get the benefit of static typing.

I would also like to set up a pipeline to run the tests automatically, including on pull requests. (edit There is now a working pipeline tied to my fork.)

Jozef Selesi added 3 commits April 26, 2020 00:07
Replace the deprecated `vscode` module with `vscode-test`, and add
test placeholders and entrypoints following the latest sample code at:

  https://github.com/microsoft/vscode-extension-samples
This fixes a bug where tags that contain a non-array value, e.g. a string
break parsing and make the tree view get stuck.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

front-matter parsing causes error and high cpu utilization

1 participant