Skip to content

Commit

Permalink
fixed failed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
temi committed Nov 27, 2024
1 parent 6b0b7b2 commit 59930de
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 71 deletions.
163 changes: 100 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@turf/convex": "^6.0.2",
"@turf/length": "^6.0.2",
"@turf/simplify": "^5.1.5",
"chromedriver": "129.0.0",
"chromedriver": "^131.0.1",
"geojson2svg": "^1.2.3",
"handlebars": "^4.7.7",
"jasmine-ajax": "^4.0.0",
Expand Down
11 changes: 4 additions & 7 deletions src/test/js/spec/SpeciesViewModelSpec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
UUID = function() {}
UUID.generate = function() {
return "666666";
}
describe("SpeciesViewModel Spec", function () {
var request, result;
it("Can participate in the DataModelItem calls like checkWarnings", function () {
Expand Down Expand Up @@ -54,13 +58,6 @@ describe("SpeciesViewModel Spec", function () {
let speciesViewModel = new SpeciesViewModel(oldSpeciesSelectedData, options, {});

speciesViewModel.loadData(newSpeciesSelectedData);
request = jasmine.Ajax.requests.filter('test/getOutputSpeciesIdUrl')[0];
request.respondWith({
status: 200,
responseJSON: responseData
});

expect(request.url).toBe('test/getOutputSpeciesIdUrl');
expect(speciesViewModel.toJS().outputSpeciesId).toEqual(responseData.outputSpeciesId)
expect(speciesViewModel.outputSpeciesId()).not.toEqual(oldSpeciesSelectedData.outputSpeciesId);

Expand Down

0 comments on commit 59930de

Please sign in to comment.