diff --git a/.gitignore b/.gitignore index da02584..f88b556 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ tmp .idea tmp junit -.DS_Store -.grunt +.DS_Store \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 2aff104..98be3d9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -88,12 +88,6 @@ module.exports = function(grunt) { // specs: 'test/fixtures/syntaxError/spec/**/*.js' // } // }, - fileExpand: { - src: ['test/fixtures/fileExpand/src/**/*.js', '!test/fixtures/fileExpand/src/exclude.js'], - options: { - specs: ['test/fixtures/fileExpand/spec/**/*.js', '!test/fixtures/fileExpand/spec/exclude.js'] - } - }, customTemplate: { src: 'test/fixtures/pivotal/src/**/*.js', options: { diff --git a/test/fixtures/fileExpand/spec/exclude.js b/test/fixtures/fileExpand/spec/exclude.js deleted file mode 100644 index 095a957..0000000 --- a/test/fixtures/fileExpand/spec/exclude.js +++ /dev/null @@ -1,7 +0,0 @@ -describe('fileExpand (excluded spec)', function() { - - it('should exclude spec files', function() { - expect(true).not.toBeTruthy(); - }); - -}); diff --git a/test/fixtures/fileExpand/spec/include.js b/test/fixtures/fileExpand/spec/include.js deleted file mode 100644 index 4d897ad..0000000 --- a/test/fixtures/fileExpand/spec/include.js +++ /dev/null @@ -1,8 +0,0 @@ -describe('fileExpand', function() { - - it('should exclude src files', function() { - expect(include).toEqual(true); - expect(typeof exclude).toEqual('undefined'); - }); - -}); diff --git a/test/jasmine_test.js b/test/jasmine_test.js index 3ec634d..a0bcc47 100644 --- a/test/jasmine_test.js +++ b/test/jasmine_test.js @@ -1,6 +1,8 @@ 'use strict'; -var grunt = require('grunt'); +var grunt = require('grunt'), + phantomjs = require('grunt-lib-phantomjs').init(grunt), + jasmine = require('../tasks/lib/jasmine.js').init(grunt, phantomjs); // Majority of test benefit comes from running the task itself. @@ -39,6 +41,13 @@ exports.jasmine = { test.equal(normalize(actual),normalize(expected), 'default test runner template'); + test.done(); + }, + + fileExpand: function(test) { + var patterns = ['test/fixtures/fileExpand/src/*.js', '!test/fixtures/fileExpand/src/exclude.js'] + var expected = ['test/fixtures/fileExpand/src/include.js']; + test.deepEqual(jasmine.getRelativeFileList('', patterns, {}), expected, 'should properly expand file list') test.done(); } };