fix tests

given that the entire Relay.QL was entity.name.function, it's not surprising here
Therefore this pr just adds "meta.delimiter.<>" to the delimiter in Relay.QL or Relay?.QL
This commit is contained in:
Steven Nguyen 2023-02-15 07:35:30 -06:00 committed by DeeDeeG
parent dcb3cda149
commit 2d3eef99ad

View File

@ -937,7 +937,7 @@ describe "JavaScript grammar", ->
it "tokenizes them as strings", ->
{tokens} = grammar.tokenizeLine('Relay.QL`fragment on Foo { id }`')
expect(tokens[0]).toEqual value: 'Relay', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js']
expect(tokens[1]).toEqual value: '.', scopes: ['source.js', 'string.quoted.template.graphql.js', 'meta.delimiter.method.period.js']
expect(tokens[1]).toEqual value: '.', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js', 'meta.delimiter.method.period.js']
expect(tokens[2]).toEqual value: 'QL', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js']
expect(tokens[3]).toEqual value: '`', scopes: ['source.js', 'string.quoted.template.graphql.js', 'punctuation.definition.string.begin.js']
expect(tokens[4]).toEqual value: 'fragment on Foo { id }', scopes: ['source.js', 'string.quoted.template.graphql.js']
@ -947,7 +947,7 @@ describe "JavaScript grammar", ->
it "tokenizes them as strings", ->
{tokens} = grammar.tokenizeLine('Relay.QL`fragment on Foo { ${myFragment} }`')
expect(tokens[0]).toEqual value: 'Relay', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js']
expect(tokens[1]).toEqual value: '.', scopes: ['source.js', 'string.quoted.template.graphql.js', 'meta.delimiter.method.period.js']
expect(tokens[1]).toEqual value: '.', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js', 'meta.delimiter.method.period.js']
expect(tokens[2]).toEqual value: 'QL', scopes: ['source.js', 'string.quoted.template.graphql.js', 'entity.name.function.js']
expect(tokens[3]).toEqual value: '`', scopes: ['source.js', 'string.quoted.template.graphql.js', 'punctuation.definition.string.begin.js']
expect(tokens[4]).toEqual value: 'fragment on Foo { ', scopes: ['source.js', 'string.quoted.template.graphql.js']