Skip to content

Commit

Permalink
Add basic CesiumGeohash test and update Project test to new model fil…
Browse files Browse the repository at this point in the history
…e location.
  • Loading branch information
laurenwalker committed Jul 22, 2022
1 parent 5b1fdfd commit 1a4d23c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/config/tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"./js/specs/unit/models/metadata/eml211/EMLOtherEntity.spec.js",
"./js/specs/unit/models/metadata/eml211/EMLParty.spec.js",
"./js/specs/unit/models/metadata/eml211/EMLTemporalCoverage.spec.js",
"./js/specs/unit/models/maps/assets/CesiumGeohash.js",
"./js/specs/unit/models/maps/assets/CesiumImagery.js",
"./js/specs/unit/common/Utilities.spec.js"
],
Expand Down
40 changes: 40 additions & 0 deletions test/js/specs/unit/models/maps/assets/CesiumGeohash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
define([
"../../../../../../../../../src/js/models/maps/assets/CesiumGeohash",
"../../../../../../../../../src/components/cesium/Cesium"
], function (CesiumGeohash, Cesium) {

// Configure the Chai assertion library
var should = chai.should();
var expect = chai.expect;

describe("CesiumGeohash Test Suite", function () {
/* Set up */
beforeEach(function () {

})

/* Tear down */
afterEach(function () {

})

describe("Initialization", function () {
it("should create a CesiumGeohash model", function () {
(new CesiumGeohash()).should.be.instanceof(CesiumGeohash)
});
});

describe("Working with Geohashes", function () {

it("gets the geohash level", function () {

let g = new CesiumGeohash();
g.setGeohashLevel(20000);
g.get("geohashLevel").should.eql(5);

})

});

});
});
2 changes: 1 addition & 1 deletion test/js/specs/unit/models/project/Project.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function checkFields(model, fields, values) {
}

define([
"../../../../../../../../src/js/models/Project",
"../../../../../../../../src/js/models/projects/Project",
], function (Project) {

// Configure the Chai assertion library
Expand Down

0 comments on commit 1a4d23c

Please sign in to comment.