Skip to content

Commit

Permalink
Merge pull request #635 from nasa-gibs/fix-buster-tests
Browse files Browse the repository at this point in the history
Fix Buster tests
  • Loading branch information
localjo authored Dec 20, 2017
2 parents 9c26907 + 464ba64 commit 13f087b
Show file tree
Hide file tree
Showing 36 changed files with 1,033 additions and 983 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ options/*
reports/*
web/ext/*
web/dist/*
web/build/*
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- '6.8.1'
- '8.8.1'
before_install: npm install -g grunt-cli
install: npm install
before_script: npm run build:tests
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ Please lint your code with `npm run lint`. Our style rules are defined in `.styl

### Unit Tests

All of the unit tests for this project need to pass before your submission will be accepted. You can run `npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.
All of the unit tests for this project need to pass before your submission will be accepted. You can run `npm build && npm test` in the command line after making changes to verify that the tests pass. If you add new functionality, please consider adding tests for that functionality as well.

Note for Windows users: `npm test` may fail unless you [install PhantomJS manually](http://phantomjs.org/download.html).

### End-to-end Tests

Expand Down
61 changes: 0 additions & 61 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ module.exports = function(grunt) {
optionsPath: optionsPath,
apache_version: grunt.option('apache-version') || '22',

buster: {
console: {},
report: {
test: {
reporter: 'xml'
}
}
},

copy: {
apache: {
src: 'etc/dev/worldview-dev.httpd<%=apache_version%>.conf',
Expand Down Expand Up @@ -240,14 +231,6 @@ module.exports = function(grunt) {
}
},

eslint: {
options: {
configFile: '.eslintrc',
format: 'stylish'
},
src: ['**/*.js', '!node_modules/**/*', '!build/**/*', '!dist/**/*', '!lib/**/*', '!options/**/*', '!web/dist/**/*', '!web/ext/**/*', '!etc/**/*']
},

exec: {
config: {
command: 'bash -c "PATH=' + pythonPath + ':"${PATH}" bin/wv-options-build "' + env
Expand Down Expand Up @@ -309,21 +292,6 @@ module.exports = function(grunt) {
}
},

lineremover: {
// After removing all the <!-- link.dev --> references, there
// are a lot of blank lines in index.html. Remove them
release: {
files: [
{
expand: true,
cwd: 'build',
src: ['**/web/**/*.html'],
dest: 'build'
}
]
}
},

markdown: {
metadata: {
files: [
Expand Down Expand Up @@ -412,24 +380,6 @@ module.exports = function(grunt) {
]
},

// Remove all development links <!-- link.dev --> and uncomment
// all the release links <!-- link.prod -->
links: {
src: [
'build/**/web/index.html', 'build/**/web/pages/*.html'
],
overwrite: true,
replacements: [
{
from: /.*link.dev.*/g,
to: ''
}, {
from: /.*link.prod.*(!--|\/\*)(.*)(--|\*\/).*/g,
to: '$2'
}
]
},

rpm_sources: {
src: [
'build/rpmbuild/SOURCES/*', 'build/rpmbuild/SPECS/*', '!**/*.tar.bz2'
Expand Down Expand Up @@ -486,13 +436,8 @@ module.exports = function(grunt) {

});

grunt.loadNpmTasks('grunt-buster');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('gruntify-eslint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-line-remover');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-git-rev-parse');
grunt.loadNpmTasks('grunt-markdown');
Expand Down Expand Up @@ -526,8 +471,6 @@ module.exports = function(grunt) {
'remove:source',
'exec:empty',
'copy:release',
'replace:links',
'lineremover',
'mkdir:dist',
'exec:tar_source_debug',
'copy:dist_source_debug_versioned',
Expand Down Expand Up @@ -574,13 +517,9 @@ module.exports = function(grunt) {
]);

grunt.registerTask('apache-config', ['load_branding', 'copy:apache', 'replace:apache']);

grunt.registerTask('update-packages', ['exec:python_packages']);
grunt.registerTask('check', ['lint', 'test']);
grunt.registerTask('clean', ['remove:build']);
grunt.registerTask('distclean', ['remove:build', 'remove:dist']);
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('test', ['buster:console']);

grunt.registerTask('default', [
'update-packages',
Expand Down
25 changes: 2 additions & 23 deletions buster.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,8 @@ var config = module.exports;
config['wv'] = {
rootPath: './',
environment: 'browser',
libs: [
'web/ext/main/lodash-2.4.1/lodash.js',
'web/ext/main/jquery-2.1.4/jquery.js',
'web/ext/main/jquery.migrate-1.2.1/jquery-migrate.min.js',
'web/ext/main/jscache-gitba01cdc/cache.js',
'web/ext/proj/proj4js-2.3.3-1/proj4.js',
'node_modules/openlayers/dist/ol-debug.js',
'test/fixtures.js'
],
src: [
'web/js/util/wv.*.js',
'web/js/wv.*.js',
'!web/js/wv.main.js',
'web/js/ui/wv.ui.js',
'web/js/ui/wv.ui.mouse.js',
'web/js/ui/wv.ui.indicator.js',
'web/js/date/wv.*.js',
'web/js/layers/wv.*.js',
'web/js/link/wv.*.js',
'web/js/palettes/wv.*.js',
'web/js/proj/wv.*.js',
'web/js/data/wv.*.js',
'web/js/map/wv.*.js'
'web/build/wv-test-bundle.js'
],
tests: ['test/**/*.js']
tests: ['test/**/*-spec.js']
};
Loading

0 comments on commit 13f087b

Please sign in to comment.