Skip to content

Commit

Permalink
Moving things around
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanforbes committed Oct 20, 2013
1 parent f76c894 commit f66be91
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ DojoGenerator.prototype.appPackage = function appPackage() {
else {
this.template('src/app/resources/main.css', appPath + '/resources/main.css');
}
this.template('src/app/tests/all.js', appPath + '/tests/all.js');
this.template('src/app/tests/unit.js', appPath + '/tests/unit.js');
this.template('src/app/tests/functional.js', appPath + '/tests/functional.js');
this.template('src/app/tests/dojoConfig.js', appPath + '/tests/dojoConfig.js');
this.template('src/app/tests/intern.js', appPath + '/tests/intern.js');
Expand Down
2 changes: 1 addition & 1 deletion app/templates/src/app/tests/intern.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ define({
},

// Non-functional test suite(s) to run in each browser
suites: [ '<%= appname %>/tests/all' ],
suites: [ '<%= appname %>/tests/unit' ],

// Functional test suite(s) to run in each browser once non-functional tests are completed
functionalSuites: [ '<%= appname %>/tests/functional' ],
Expand Down
File renamed without changes.
14 changes: 10 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,23 @@ var TestGenerator = module.exports = function TestGenerator(args, options) {
this.appUrl = relativeAppUrl;
this.testsUrl = relativeTestsUrl;
this.baseUrl = relativeBaseUrl;

this.on('end', function () {
console.log('Don\'t forget to add ' + path.join(this.appname, 'tests', this.subdir, this.name) +
' to the dependency list in ' +
path.join('src', this.appname, 'tests', (this.functional ? 'functional' : 'unit') + '.js'));
}.bind(this));
};

util.inherits(TestGenerator, yeoman.generators.NamedBase);

TestGenerator.prototype.files = function files() {
var testPath = path.join('src', this.appname, 'tests');
var testPath = path.join('src', this.appname, 'tests', this.subdir);
if (this.functional) {
this.template('functional.js', path.join(testPath, this.subdir, this.name + '.js'));
this.template('functional.html', path.join(testPath, this.subdir, this.name + '.html'));
this.template('functional.js', path.join(testPath, this.name + '.js'));
this.template('functional.html', path.join(testPath, this.name + '.html'));
}
else {
this.template('unit.js', path.join(testPath, this.subdir, this.name + '.js'));
this.template('unit.js', path.join(testPath, this.name + '.js'));
}
};

0 comments on commit f66be91

Please sign in to comment.