mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-01 19:35:23 +03:00
Transform specs to something useful
This commit is contained in:
parent
1cc4c52c7a
commit
dd041945d2
19
spec/fixtures/markdown/file.markdown
vendored
19
spec/fixtures/markdown/file.markdown
vendored
@ -1,3 +1,20 @@
|
|||||||
## File.markdown
|
## File.markdown
|
||||||
|
|
||||||
:cool:
|
:cool:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
def func
|
||||||
|
x = 1
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
function f(x) {
|
||||||
|
return x++;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```kombucha
|
||||||
|
drink-that-stuff:
|
||||||
|
tastes-weird~
|
||||||
|
```
|
||||||
|
@ -31,3 +31,13 @@ describe "MarkdownPreviewView", ->
|
|||||||
it "reassociates with the same buffer when deserialized", ->
|
it "reassociates with the same buffer when deserialized", ->
|
||||||
newPreview = deserialize(preview.serialize())
|
newPreview = deserialize(preview.serialize())
|
||||||
expect(newPreview.buffer).toBe buffer
|
expect(newPreview.buffer).toBe buffer
|
||||||
|
|
||||||
|
fdescribe "code block tokenization", ->
|
||||||
|
describe "when the code block's fence name has a matching grammar", ->
|
||||||
|
it "tokenizes the code block with the grammar", ->
|
||||||
|
expect(preview.find("pre code.lang-ruby .entity.name.function.ruby")).toExist()
|
||||||
|
|
||||||
|
describe "when the code block's fence name doesn't have a matching grammar", ->
|
||||||
|
it "does not tokenize the code block", ->
|
||||||
|
expect(preview.find("pre code:not([class])").children().length).toBe 0
|
||||||
|
expect(preview.find("pre code.lang-kombucha").children().length).toBe 0
|
||||||
|
Loading…
Reference in New Issue
Block a user