You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
torque/test/provider.jsonarray.js

20 lines
492 B

var torque = require('../lib/torque/core');
var jsonarray_fixture = require('./data/torque.array.json');
QUnit.module('provider.jsonarray');
test("processTile", function() {
var json = new torque.providers.JsonArray({
url: "http://test.com/{z}/{x}/{y}.json"
});
var tile = json.proccessTile(jsonarray_fixture.rows, {
x: 0,
y: 0,
z: 0
});
ok(tile);
equal(jsonarray_fixture.rows.length, tile.x.length);
equal(jsonarray_fixture.rows.length, tile.y.length);
});