AdguardTeam / VscodeAdblockSyntax

Comprehensive extension to manage Adblock Syntax in VSCode: syntax highlighter, linter and much more. Available on the VSCode Marketplace.
https://marketplace.visualstudio.com/items?itemName=adguard.adblock
MIT License
70 stars 8 forks source link

Unit tests for tokenization #62

Open scripthunter7 opened 1 year ago

scripthunter7 commented 1 year ago

Based on the TMLanguage, it is possible to tokenize various inputs and then compare them with a token list. This makes test_rules.txt unnecessary in practice (good for a demo at most), since unit tests can be used to ensure that there is no breakage and that tokenization always happens as expected.

See: https://www.npmjs.com/package/vscode-textmate