 
       urls = provider.get_tiles_by_extent(xmin, ymin, xmax, ymax, level)
       for url in expected_tiles
-        expect(expected_tiles.indexOf(url)).to.be.above -1
+        expect(expected_tiles.indexOf(url)).to.be.above(-1)

  T = new TileExpects()
  tol = 0.01

  describe "Grid Layer", ->
    url = 'http://c.tiles.mapbox.com/v3/examples.map-szwdot65/{Z}/{X}/{Y}.png'
    provider = new Geo.TileProvider(url, 256)


      expect(provider.get_level_by_extent(T.MERCATOR_BOUNDS, 1024, 1024)).to.be.equal(2)

    it "should get closest zoom level based on extent and height/width", ->
      expect(provider.get_closest_level_by_extent(T.MERCATOR_BOUNDS, 256, 256)).to.be.equal(0)
      expect(provider.get_closest_level_by_extent(T.MERCATOR_BOUNDS, 513, 512)).to.be.equal(1)
      expect(provider.get_closest_level_by_extent(T.MERCATOR_BOUNDS, 1024, 1024)).to.be.equal(2)

    it "should convert pixel x/y to tile x/y", ->
      expect(provider.pixels_to_tile(1, 1)).to.be.eql([0,0])
      expect(provider.pixels_to_tile(0, 0)).to.be.eql([0,0])

    it "should convert pixel x/y to meters x/y", ->
      expect(provider.pixels_to_meters(0, 0, 0)).to.be.eql([-20037508.342789244, -20037508.342789244])

    it "should get tile bounds in meters", ->
      bounds = provider.get_tile_meter_bounds(511, 1202, 11)
