mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Transform specs to something useful
This commit is contained in:
committed by
Garen Torikian & Nathan Sobo
parent
1cc4c52c7a
commit
dd041945d2
19
spec/fixtures/markdown/file.markdown
vendored
19
spec/fixtures/markdown/file.markdown
vendored
@@ -1,3 +1,20 @@
|
||||
## 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", ->
|
||||
newPreview = deserialize(preview.serialize())
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user