Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
chbk committed Feb 1, 2021
1 parent f66a8af commit 09c43e4
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions spec/tree-sitter-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 1]).toString()).toBe(
'.source.ruby .constant.other.symbol'
'.source.ruby .string.immutable'
)

expect(editor.scopeDescriptorForBufferPosition([1, 3]).toString()).toBe(
'.source.ruby .constant.other.symbol'
'.source.ruby .string.immutable'
)
})

Expand All @@ -37,26 +37,26 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support'
)
expect(editor.scopeDescriptorForBufferPosition([1, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support'
)
expect(editor.scopeDescriptorForBufferPosition([2, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support'
)
expect(editor.scopeDescriptorForBufferPosition([4, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support.call'
)
expect(editor.scopeDescriptorForBufferPosition([5, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support.call'
)
expect(editor.scopeDescriptorForBufferPosition([6, 0]).toString()).toBe(
'.source.ruby .keyword.other.special-method'
'.source.ruby .entity.function.method.support.call'
)
})

it('tokenizes keyword predicates', async () => {
it('tokenizes predicates', async () => {
const editor = await atom.workspace.open('foo.rb')

editor.setText(dedent`
Expand All @@ -66,13 +66,13 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .keyword.operator.defined'
)
expect(editor.scopeDescriptorForBufferPosition([1, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .entity.function.method.support.kernel'
)
expect(editor.scopeDescriptorForBufferPosition([2, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .entity.function.method.support.kernel'
)
})

Expand All @@ -85,10 +85,10 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .entity.function.method.support.call'
)
expect(editor.scopeDescriptorForBufferPosition([1, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .keyword.storage.declaration'
)
})

Expand All @@ -101,11 +101,11 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .keyword.variable.super'
)

expect(editor.scopeDescriptorForBufferPosition([1, 0]).toString()).toBe(
'.source.ruby .keyword.control'
'.source.ruby .keyword.storage.modifier'
)
})

Expand All @@ -116,7 +116,7 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .variable'
'.source.ruby .entity.variable'
)
})

Expand All @@ -127,7 +127,7 @@ describe('Tree-sitter Ruby grammar', () => {
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).not.toBe(
'.source.ruby .variable'
'.source.ruby .entity.variable'
)
})
})

0 comments on commit 09c43e4

Please sign in to comment.