Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding unit testing with Jasmine & Travis configuration #16

Merged
merged 26 commits into from
Jan 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fb224be
Initiating Jasmine tests with Grunt & Travis
Wilkins Jan 27, 2016
9616e68
Changing node version
Wilkins Jan 27, 2016
b4d8005
Using SASS and latest node version
Wilkins Jan 27, 2016
371a616
Adding Jasmine tests to Travis build + More tests
Wilkins Jan 27, 2016
95834e4
More tests + better testing environment
Wilkins Jan 28, 2016
d9e3628
Ajout de Jasmine JQuery dans le package.json
Wilkins Jan 28, 2016
0fdc780
New tests for Nova Scotia (issue #12)
Wilkins Jan 29, 2016
bde74cb
Remaing test cases.
Wilkins Jan 29, 2016
3c191d6
Initiating Jasmine tests with Grunt & Travis
Wilkins Jan 27, 2016
1f03c37
Changing node version
Wilkins Jan 27, 2016
56b3203
Using SASS and latest node version
Wilkins Jan 27, 2016
e33ff23
Adding Jasmine tests to Travis build + More tests
Wilkins Jan 27, 2016
c422319
More tests + better testing environment
Wilkins Jan 28, 2016
d5cbc87
Ajout de Jasmine JQuery dans le package.json
Wilkins Jan 28, 2016
ddc9d14
New tests for Nova Scotia (issue #12)
Wilkins Jan 29, 2016
7ec7a3b
Remaing test cases.
Wilkins Jan 29, 2016
96aafe1
Rebasing
Wilkins Jan 29, 2016
8146140
Adding test cases with optimization=0
Wilkins Jan 29, 2016
373f458
Merging travis branch
Wilkins Jan 29, 2016
848c912
More tests + better testing environment
Wilkins Jan 28, 2016
caf4775
New tests for Nova Scotia (issue #12)
Wilkins Jan 29, 2016
b69a8c3
Remaing test cases.
Wilkins Jan 29, 2016
89849ea
Rebasing
Wilkins Jan 29, 2016
502a142
Adding test cases with optimization=0
Wilkins Jan 29, 2016
b694c92
Using Travis for upstream repo
Wilkins Jan 29, 2016
aa52da3
Grunt
Wilkins Jan 29, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ vendor/jquery-autocomplete/*
vendor/i18next/*
css/.sass-cache
*.swp
.grunt
_SpecRunner.html
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
language: node_js
node_js:
- "0.8"
before_install: npm install -g grunt-cli
- "0.12"
- "0.11"
- "0.10"
before_install:
- npm install -g grunt-cli
- gem install sass
install: npm install
script: grunt --verbose --force
script:
- grunt --verbose --force
- grunt travis --verbose
41 changes: 39 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ grunt.initConfig({
"-W033": true,
"-W044": true //ignore regexp
},
files: ['src/main.js', 'src/formats.js', 'src/formats/*.js', 'src/layers.js', 'src/i18n.js', 'locales/*/*.json', 'package.json']
sources: ['src/main.js', 'src/formats.js', 'src/formats/*.js', 'src/layers.js', 'src/i18n.js', 'locales/*/*.json', 'package.json'],
tests: ['tests/*.js']

},
uglify: {
dist: {
Expand Down Expand Up @@ -113,6 +115,36 @@ grunt.initConfig({
//,dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.css'
}
},
jasmine: {
components: {
src: [
'src/layers.js',
'src/formats.js',
'src/formats/*.js',
],
options: {
vendor: [
'http://code.jquery.com/jquery-1.8.3.min.js',
// Here we use the non minified source
'http://cdn.leafletjs.com/leaflet-0.7/leaflet-src.js',
'vendor/simplify-geometry/simplifygeometry-0.0.1.min.js',
'dist/jquery.cookie.min.js',
'dist/togeojson.min.js',
'dist/togpx.min.js',
'dist/pretty-data.min.js',
'dist/tokml.min.js',
'dist/geojson-to-path.min.js',
'dist/leaflet.filelayer.min.js',
'dist/FileSaver.min.js',
'dist/i18next.min.js',
'dist/i18n.min.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js'
],
specs: 'tests/*.js',
keepRunner : false,
}
}
},
watch: {
css: {
options: { livereload: true },
Expand All @@ -134,13 +166,18 @@ grunt.initConfig({

grunt.registerTask('default', [
'clean',
'jshint',
'jshint:sources',
'uglify',
'concat',
'sass',
'cssmin',
//'copy'
]);
grunt.registerTask('travis', [
'jshint:tests',
'jasmine',
]);



require('load-grunt-tasks')(grunt);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Track Simplifier / Optimizer online
Track Simplifier / Optimizer online [![Build Status](https://travis-ci.org/stefanocudini/gpx-simplify-optimizer.svg?branch=master)](https://travis-ci.org/stefanocudini/gpx-simplify-optimizer)
============

Online Simplifier and Optimizer for GPX / GeoJSON / KML tracks.
Expand Down
6 changes: 3 additions & 3 deletions dist/app.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/formats.min.js

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

2 changes: 1 addition & 1 deletion dist/i18n.min.js

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

Loading