Sha256: d85ec4aa3be11d0deebbac41b42257f0eba8afb7e25c4a7c9f31109710079647

Contents?: true

Size: 443 Bytes

Versions: 6

Compression:

Stored size: 443 Bytes

Contents

require "spec_helper"

describe GraphQL::Language::Lexer do
  subject { GraphQL::Language::Lexer }

  describe ".tokenize" do
    let(:query_string) {%|
      {
        query getCheese {
          cheese(id: 1) {
            ... cheeseFields
          }
        }
      }
    |}
    let(:tokens) { subject.tokenize(query_string) }

    it "keeps track of previous_token" do
      assert_equal tokens[0], tokens[1].prev_token
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
graphql-1.2.2 spec/graphql/language/lexer_spec.rb
graphql-1.2.1 spec/graphql/language/lexer_spec.rb
graphql-1.2.0 spec/graphql/language/lexer_spec.rb
graphql-1.1.0 spec/graphql/language/lexer_spec.rb
graphql-1.0.0 spec/graphql/language/lexer_spec.rb
graphql-0.19.4 spec/graphql/language/lexer_spec.rb