Splitting tests between api and internal.
This commit is contained in:
@@ -15,14 +15,15 @@
|
|||||||
<script type="text/javascript" src="jasmine-extensions.js"></script>
|
<script type="text/javascript" src="jasmine-extensions.js"></script>
|
||||||
|
|
||||||
<!-- include spec files here... -->
|
<!-- include spec files here... -->
|
||||||
<script type="text/javascript" src="spec/ol/Bounds.test.js"></script>
|
<script type="text/javascript" src="spec/api/bounds.test.js"></script>
|
||||||
|
<script type="text/javascript" src="spec/api/geom/geom.test.js"></script>
|
||||||
|
<script type="text/javascript" src="spec/api/loc.test.js"></script>
|
||||||
|
<script type="text/javascript" src="spec/api/map.test.js"></script>
|
||||||
|
<script type="text/javascript" src="spec/api/projection.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/Events.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Events.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/Loc.test.js"></script>
|
|
||||||
<script type="text/javascript" src="spec/ol/Map.test.js"></script>
|
|
||||||
<script type="text/javascript" src="spec/ol/Projection.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Projection.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/Tile.test.js"></script>
|
<script type="text/javascript" src="spec/ol/Tile.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/TileSet.test.js"></script>
|
<script type="text/javascript" src="spec/ol/TileSet.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/geom/Geometry.test.js"></script>
|
|
||||||
<script type="text/javascript" src="spec/ol/geom/Point.test.js"></script>
|
<script type="text/javascript" src="spec/ol/geom/Point.test.js"></script>
|
||||||
<script type="text/javascript" src="spec/ol/layer/XYZ.test.js"></script>
|
<script type="text/javascript" src="spec/ol/layer/XYZ.test.js"></script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
describe("ol.Bounds", function() {
|
describe("ol.bounds", function() {
|
||||||
|
|
||||||
it("allows flexible construction", function() {
|
it("allows flexible construction", function() {
|
||||||
var bounds, proj;
|
var bounds, proj;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
describe("ol.geom.Geometry", function() {
|
describe("ol.geom.geometry", function() {
|
||||||
var g;
|
var g;
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
describe("ol.Loc", function() {
|
describe("ol.loc", function() {
|
||||||
|
|
||||||
it("allows empty construction", function() {
|
it("allows empty construction", function() {
|
||||||
var loc;
|
var loc;
|
||||||
@@ -69,7 +69,7 @@ describe("ol.Loc", function() {
|
|||||||
var loc = ol.loc({x: 1, y: 2, projection: "EPSG:4326"});
|
var loc = ol.loc({x: 1, y: 2, projection: "EPSG:4326"});
|
||||||
|
|
||||||
proj = loc.projection();
|
proj = loc.projection();
|
||||||
expect(proj).toBe(ol.Projection);
|
expect(proj).toBeA(ol.Projection);
|
||||||
expect(proj.code()).toBe("EPSG:4326");
|
expect(proj.code()).toBe("EPSG:4326");
|
||||||
|
|
||||||
// after construction
|
// after construction
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
describe("ol.Map", function() {
|
describe("ol.map", function() {
|
||||||
|
|
||||||
// HPI - Hipster Programming Interface
|
|
||||||
// EPI - Enterprise Programming Interface
|
|
||||||
|
|
||||||
it("should be easy to make a map", function() {
|
it("should be easy to make a map", function() {
|
||||||
|
|
||||||
28
test/spec/api/projection.test.js
Normal file
28
test/spec/api/projection.test.js
Normal file
@@ -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");
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
@@ -1,30 +1,5 @@
|
|||||||
describe("ol.Projection", function() {
|
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() {
|
it("handles transforms", function() {
|
||||||
|
|
||||||
var point = {x: 10, y: 20, z: 30};
|
var point = {x: 10, y: 20, z: 30};
|
||||||
|
|||||||
Reference in New Issue
Block a user