feat(web): document the API

This commit is contained in:
Amaan Qureshi 2025-01-20 02:43:52 -05:00
parent a4b20c1c56
commit 09cb4c5729
17 changed files with 1155 additions and 198 deletions

View file

@ -26,11 +26,11 @@ describe('Parser', () => {
describe('.setLanguage', () => {
it('allows setting the language to null', () => {
expect(parser.getLanguage()).toBeNull();
expect(parser.language).toBeNull();
parser.setLanguage(JavaScript);
expect(parser.getLanguage()).toBe(JavaScript);
expect(parser.language).toBe(JavaScript);
parser.setLanguage(null);
expect(parser.getLanguage()).toBeNull();
expect(parser.language).toBeNull();
});
it('throws an exception when the given object is not a tree-sitter language', () => {