   chai = require 'chai' unless chai
   parser = require '../lib/ccss-compiler'
 
-
-parse = (source, expect, pending) ->
+{expect} = chai
+
+
+parse = (source, expectation, pending) ->
   itFn = if pending then xit else it
 
   describe source, ->


    itFn 'should do something', ->
      result = parser.parse source
      chai.expect(result).to.be.an 'object'
    itFn 'commands ✓', ->
      chai.expect(result.commands).to.eql expect.commands or []
    itFn 'selectors ✓', ->
      chai.expect(result.selectors).to.eql expect.selectors or []
      #chai.expect(result.vars).to.eql expect.vars or []
      #chai.expect(result.constraints).to.eql expect.constraints or []


# Helper function for expecting errors to be thrown when parsing.


    it predicate, ->
      exercise = -> parser.parse source
      expect(exercise).to.throw Error, message


describe 'CCSS-to-AST', ->
  it 'should provide a parse method', ->
    expect(parser.parse).to.be.a 'function'

  # Basics
  # ====================================================================
