I have written my own grammar in atom. I would like to write some specs for the same, but I am unable to understand how exactly to write one. I read the Jasmine documentation, but still not very clear. Can someone please explain how to write specs for testing out grammar in atom. Thanks
atom.grammars.grammarForScopeName("source.yourlanguage")
tokenizeLine
,tokenizeLines
).E.g. (CoffeeScript alert):
Happy testing!
The array returned by the
grammar.tokenizeLine
call above looks like this:(Kept seeing this question pop up in the search results when I was looking for an answer to the same question - so just as well document it here.)