 
       it "should mark all parts of the string with the same scope", ->
         for token in tokens
-          expect(token).toHaveScope "string.quoted.double.single-line.powershell"
+          expect(token).toHaveScopes ["string.quoted.double.single-line.powershell"]
 
       it "should tokenize the opening double-quote as punctuation", ->
         expect(tokens[0].value).toEqual "\""
-        expect(tokens[0]).toHaveScope "punctuation.definition.string.begin.powershell"
+        expect(tokens[0]).toHaveScopes ["punctuation.definition.string.begin.powershell"]
 
       it "should tokenize the closing double-quote as empty string", ->
         expect(tokens[1].value).toEqual "\""

    waitsForPromise ->
      atom.packages.activatePackage("language-powershell")
    this.addMatchers
      toHaveScope: (scope) ->
        notText = if @isNot then "not" else ""
        this.message = =>"Expected token \"#{@actual.value}\" to #{notText} have scope \"#{scope}\". Instead found: [#{@actual.scopes.toString()}]"
        return scope in @actual.scopes

      toHaveScopes: (scopes) ->
        notText = if @isNot then "not" else ""
        this.message = =>"Expected token \"#{@actual.value}\" to #{notText} have scope \"#{scope}\". Instead found: [#{@actual.scopes.toString()}]"
        allScopesPresent = scopes.every (scope) =>
          return scope in @actual.scopes



      it "should tokenize variable names", ->
        expect(tokens[3].value).toEqual "name"
        expect(tokens[3]).toHaveScopes ["embedded.variable.other.powershell"]

      it "should not tokenize as a variable when leading $ has been escaped", ->
        expect(tokens[4].value).toEqual " `$bob"
