Replaced jasmine testing framework by mocha, expect.js and sinon

as discussed in #319
This commit is contained in:
Tobias Bieniek
2013-03-13 04:32:43 +01:00
parent a0b1d74bb5
commit 89ab68cde7
53 changed files with 13096 additions and 5163 deletions

View File

@@ -5,18 +5,18 @@ describe('ol.TileCoord', function() {
describe('create', function() {
it('sets x y z properties as expected', function() {
var tc = new ol.TileCoord(1, 2, 3);
expect(tc.z).toEqual(1);
expect(tc.x).toEqual(2);
expect(tc.y).toEqual(3);
expect(tc.z).to.eql(1);
expect(tc.x).to.eql(2);
expect(tc.y).to.eql(3);
});
});
describe('create from quad key', function() {
it('sets x y z properties as expected', function() {
var tc = ol.TileCoord.createFromQuadKey('213');
expect(tc.z).toEqual(3);
expect(tc.x).toEqual(3);
expect(tc.y).toEqual(5);
expect(tc.z).to.eql(3);
expect(tc.x).to.eql(3);
expect(tc.y).to.eql(5);
});
});
@@ -24,9 +24,9 @@ describe('ol.TileCoord', function() {
it('sets x y z properties as expected', function() {
var str = '1/2/3';
var tc = ol.TileCoord.createFromString(str);
expect(tc.z).toEqual(1);
expect(tc.x).toEqual(2);
expect(tc.y).toEqual(3);
expect(tc.z).to.eql(1);
expect(tc.x).to.eql(2);
expect(tc.y).to.eql(3);
});
});
@@ -34,7 +34,7 @@ describe('ol.TileCoord', function() {
it('returns expected string', function() {
var tc = new ol.TileCoord(3, 3, 5);
var s = tc.quadKey();
expect(s).toEqual('213');
expect(s).to.eql('213');
});
});
@@ -42,7 +42,7 @@ describe('ol.TileCoord', function() {
it('produces different hashes for different tile coords', function() {
var tc1 = new ol.TileCoord(3, 2, 1);
var tc2 = new ol.TileCoord(3, 1, 1);
expect(tc1.hash()).not.toEqual(tc2.hash());
expect(tc1.hash()).not.to.eql(tc2.hash());
});
});
});