diff --git a/test/index.html b/test/index.html index 9b5c812e16..e43d5bc22a 100644 --- a/test/index.html +++ b/test/index.html @@ -15,14 +15,15 @@ - + + + + + - - - diff --git a/test/spec/ol/Bounds.test.js b/test/spec/api/bounds.test.js similarity index 95% rename from test/spec/ol/Bounds.test.js rename to test/spec/api/bounds.test.js index 44f9328815..2a48944b96 100644 --- a/test/spec/ol/Bounds.test.js +++ b/test/spec/api/bounds.test.js @@ -1,4 +1,4 @@ -describe("ol.Bounds", function() { +describe("ol.bounds", function() { it("allows flexible construction", function() { var bounds, proj; diff --git a/test/spec/ol/geom/Geometry.test.js b/test/spec/api/geom/geom.test.js similarity index 96% rename from test/spec/ol/geom/Geometry.test.js rename to test/spec/api/geom/geom.test.js index cd071e8a45..9faf138b13 100644 --- a/test/spec/ol/geom/Geometry.test.js +++ b/test/spec/api/geom/geom.test.js @@ -1,4 +1,4 @@ -describe("ol.geom.Geometry", function() { +describe("ol.geom.geometry", function() { var g; beforeEach(function() { diff --git a/test/spec/ol/Loc.test.js b/test/spec/api/loc.test.js similarity index 97% rename from test/spec/ol/Loc.test.js rename to test/spec/api/loc.test.js index 47bd9a5673..88b0aefdfa 100644 --- a/test/spec/ol/Loc.test.js +++ b/test/spec/api/loc.test.js @@ -1,4 +1,4 @@ -describe("ol.Loc", function() { +describe("ol.loc", function() { it("allows empty construction", function() { var loc; @@ -69,7 +69,7 @@ describe("ol.Loc", function() { var loc = ol.loc({x: 1, y: 2, projection: "EPSG:4326"}); proj = loc.projection(); - expect(proj).toBe(ol.Projection); + expect(proj).toBeA(ol.Projection); expect(proj.code()).toBe("EPSG:4326"); // after construction diff --git a/test/spec/ol/Map.test.js b/test/spec/api/map.test.js similarity index 98% rename from test/spec/ol/Map.test.js rename to test/spec/api/map.test.js index 5b0a1327a7..c7e8ada22a 100644 --- a/test/spec/ol/Map.test.js +++ b/test/spec/api/map.test.js @@ -1,7 +1,4 @@ -describe("ol.Map", function() { - - // HPI - Hipster Programming Interface - // EPI - Enterprise Programming Interface +describe("ol.map", function() { it("should be easy to make a map", function() { diff --git a/test/spec/api/projection.test.js b/test/spec/api/projection.test.js new file mode 100644 index 0000000000..aad98e5cac --- /dev/null +++ b/test/spec/api/projection.test.js @@ -0,0 +1,28 @@ +describe("ol.projection", function() { + + it("constructs instances", function() { + var p; + + p = ol.projection("foo"); + expect(p.code()).toBe("foo"); + + p = ol.projection({ + code: "bar", + units: "m" + }); + expect(p.code()).toBe("bar"); + + }); + + it("allows units to be set", function() { + var p; + + p = ol.projection("foo"); + expect(p.units()).toBeUndefined(); + + p = ol.projection({code: "foo", units: "m"}); + expect(p.units()).toBe("m"); + + }); + +}); diff --git a/test/spec/ol/Projection.test.js b/test/spec/ol/Projection.test.js index 7167933765..e34322b323 100644 --- a/test/spec/ol/Projection.test.js +++ b/test/spec/ol/Projection.test.js @@ -1,30 +1,5 @@ describe("ol.Projection", function() { - it("constructs instances", function() { - var p; - - p = ol.projection("foo"); - expect(p.code()).toBe("foo"); - - p = ol.projection({ - code: "bar", - units: "m" - }); - expect(p.code()).toBe("bar"); - - }); - - it("allows units to be set", function() { - var p; - - p = ol.projection("foo"); - expect(p.units()).toBeUndefined(); - - p = ol.projection({code: "foo", units: "m"}); - expect(p.units()).toBe("m"); - - }); - it("handles transforms", function() { var point = {x: 10, y: 20, z: 30};