Skip to content

Commit

Permalink
write tests that assert the markers are shown or hidden as in the new…
Browse files Browse the repository at this point in the history
… example code (#52)

* heatmap color remains same

* over ride method for zoomlevel , precision created

* Update README.md

* testing init

* jasmine.json changed

* tests added

* done changes

* changes recommended  by jeff

* test

* gruntfile modified

* last test runs now/fixtures are loaded now

* specRunner added

* tests running now :)
  • Loading branch information
sagarpreet-chadha authored and jywarren committed Apr 2, 2019
1 parent 60729c4 commit ab0774f
Show file tree
Hide file tree
Showing 7 changed files with 731 additions and 11 deletions.
22 changes: 18 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ module.exports = function(grunt) {
},

jasmine: {
src: "src/client/js/*.js",
src: ['dist/Leaflet.BlurredLocationDisplay.js'],
options: {
specs: "spec/javascripts/*spec.js",
vendor: ['node_modules/jquery/dist/jquery.js','dist/Leaflet.BlurredLocationDisplay.js','node_modules/jasmine-jquery/lib/jasmine-jquery.js'],
vendor: [
'node_modules/jquery/dist/jquery.js',
'node_modules/bootstrap/dist/js/bootstrap.min.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js' ,
'node_modules/jasmine-ajax/lib/mock-ajax.js',
'node_modules/leaflet-blurred-location/dist/Leaflet.BlurredLocation.js',
'node_modules/leaflet-graticule/Leaflet.Graticule.js'
],
summary: false,
keepRunner: true,
'--web-security' : false,
'--local-to-remote-url-access' : true,
'--ignore-ssl-errors' : true
}
},

Expand All @@ -50,9 +62,11 @@ module.exports = function(grunt) {
});

/* Default (development): Watch files and build on change. */
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.registerTask("default", ["watch", "jasmine"]);
grunt.registerTask("test", ["jshint", "jasmine"]);
grunt.registerTask('build', [
'browserify:dist'
]);
grunt.registerTask('test', ['jshint', 'jasmine']);
grunt.registerTask('build', ['browserify']);

};
43 changes: 43 additions & 0 deletions _SpecRunner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href=".grunt/grunt-contrib-jasmine/jasmine_favicon.png">

<link rel="stylesheet" type="text/css" href=".grunt/grunt-contrib-jasmine/jasmine.css">


</head>
<body>


<script src=".grunt/grunt-contrib-jasmine/jasmine.js"></script>

<script src=".grunt/grunt-contrib-jasmine/jasmine-html.js"></script>

<script src=".grunt/grunt-contrib-jasmine/json2.js"></script>

<script src=".grunt/grunt-contrib-jasmine/boot.js"></script>

<script src="node_modules/jquery/dist/jquery.js"></script>

<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>

<script src="node_modules/jasmine-jquery/lib/jasmine-jquery.js"></script>

<script src="node_modules/jasmine-ajax/lib/mock-ajax.js"></script>

<script src="node_modules/leaflet-blurred-location/dist/Leaflet.BlurredLocation.js"></script>

<script src="node_modules/leaflet-graticule/Leaflet.Graticule.js"></script>

<script src="dist/Leaflet.BlurredLocationDisplay.js"></script>

<script src="spec/javascripts/test_spec.js"></script>

<script src=".grunt/grunt-contrib-jasmine/reporter.js"></script>


</body>
</html>
2 changes: 1 addition & 1 deletion examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<link href="../node_modules/leaflet/dist/leaflet.css" rel="stylesheet">
<script src="../node_modules/leaflet/dist/leaflet.js"></script>

<script src="../node_modules/leaflet-blurred-location/dist/Leaflet.BlurredLocation.js"></script>
<script src="../dist/Leaflet.BlurredLocationDisplay.js"></script>

Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,14 @@
"jasmine-ajax": "^4.0.0",
"jasmine-jquery": "^2.1.1",
"leaflet": "^1.4.0",
"leaflet-graticule": "git://github.com/jywarren/Leaflet.Graticule.git#patch-1",
"map_module": "git://github.com/publiclab/leaflet-blurred-location#master",
"matchdep": "^2.0.0",
"require": "^2.4.20",
"resig-class": "^1.0.0",
"leaflet-graticule": "git://github.com/jywarren/Leaflet.Graticule.git#patch-1",
"leaflet-blurred-location": "git://github.com/publiclab/leaflet-blurred-location#feature_API_modifications"
"leaflet-blurred-location": "git://github.com/publiclab/leaflet-blurred-location#main"
},
"dependencies": {
"jquery": "^3.3.1",
"leaflet-blurred-location": "git://github.com/publiclab/leaflet-blurred-location#feature_API_modifications",
"map_module": "git://github.com/publiclab/leaflet-blurred-location.git#master"
"leaflet-blurred-location": "git://github.com/publiclab/leaflet-blurred-location#main"
}
}
Loading

0 comments on commit ab0774f

Please sign in to comment.