Skip to content

Commit

Permalink
Merge pull request #50 from p-js/adjustment-for-scoping
Browse files Browse the repository at this point in the history
Adjustment for scoping, so loglevel can be used with preprocessing and apply()
  • Loading branch information
pimterry committed Aug 19, 2014
2 parents 129affa + 373ca2d commit 0327200
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 171 deletions.
20 changes: 19 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ module.exports = function (grunt) {
vendor: 'test/vendor/*.js'
}
},
context: {
src: 'test/test-context-using-apply.test.js',
options: {
specs: 'test/global-integration-with-new-context.js',
vendor: 'test/vendor/*.js'
}
},
withCoverage: {
src: 'lib/**/*.js',
options: {
Expand Down Expand Up @@ -174,6 +181,15 @@ module.exports = function (grunt) {
},
qunit: {
all: ['test/*-qunit.html']
},
preprocess: {
"test-context-using-apply": {
src: 'test/test-context-using-apply.js',
dest: 'test/test-context-using-apply.test.js'
}
},
clean:{
test:['test/test-context-using-apply.test.js']
}
});

Expand All @@ -190,12 +206,14 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('grunt-preprocess');
grunt.loadNpmTasks('grunt-contrib-clean');

// Build a distributable release
grunt.registerTask('dist', ['test', 'concat', 'uglify']);

// Check everything is good
grunt.registerTask('test', ['jshint', 'jasmine:requirejs', 'jasmine:global', 'jasmine_node', 'jasmine:withCoverage', 'qunit']);
grunt.registerTask('test', ['jshint', 'jasmine:requirejs', 'jasmine:global', 'preprocess', 'jasmine:context', 'clean:test', 'jasmine_node', 'jasmine:withCoverage', 'qunit']);

// Test with a live server and an actual browser
grunt.registerTask('integration-test', ['jasmine:requirejs:src:build', 'open:jasmine', 'connect:test:keepalive']);
Expand Down
Loading

0 comments on commit 0327200

Please sign in to comment.