feat(web): document the API
This commit is contained in:
parent
a4b20c1c56
commit
09cb4c5729
17 changed files with 1155 additions and 198 deletions
|
|
@ -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', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue