-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5cc45a
commit 4c0177d
Showing
5 changed files
with
95 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- '0.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* jshint node:true */ | ||
define([ | ||
'intern!object', | ||
'intern/chai!assert', | ||
'intern/node_modules/dojo/Deferred', | ||
'intern/node_modules/dojo/node!path', | ||
'intern/node_modules/dojo/node!yeoman-generator', | ||
'module' | ||
], function (registerSuite, assert, Deferred, path, generator, module) { | ||
var helpers = generator.test, | ||
app; | ||
|
||
registerSuite({ | ||
name: 'creation', | ||
|
||
beforeEach: function () { | ||
var dfd = new Deferred(); | ||
|
||
helpers.testDirectory(path.join(path.dirname(module.uri), 'temp'), function (err) { | ||
if (err) { | ||
return dfd.reject(err); | ||
} | ||
|
||
app = helpers.createGenerator('dojo:app', [ | ||
'../../app' | ||
]); | ||
|
||
dfd.resolve(); | ||
}); | ||
|
||
return dfd.promise; | ||
}, | ||
|
||
'expected files': function () { | ||
var dfd = this.async(), | ||
expected = [ | ||
'.jshintrc', | ||
'.editorconfig', | ||
'src/temp/resources/main.styl' | ||
]; | ||
|
||
helpers.mockPrompt(app, { | ||
'dojoVersion': '1.9.1', | ||
'features': [ 'dijit', 'dgrid', 'stylus' ], | ||
'dgridVersion': '0.3.10', | ||
'nib': true, | ||
'compression': 'closure', | ||
'travisci': false | ||
}); | ||
app.options['skip-install'] = true; | ||
app.run({}, function () { | ||
helpers.assertFiles(expected); | ||
dfd.resolve(); | ||
}); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Learn more about configuring this file at <https://github.com/theintern/intern/wiki/Configuring-Intern>. | ||
// These default settings work OK for most people. The options that *must* be changed below are the | ||
// packages, suites, excludeInstrumentation, and (if you want functional tests) functionalSuites. | ||
define({ | ||
// Configuration options for the module loader; any AMD configuration options supported by the Dojo loader can be | ||
// used here | ||
loader: { | ||
// Packages that should be registered with the loader in each testing environment | ||
packages: [ { name: 'generator-dojo', location: '.' } ] | ||
}, | ||
|
||
// Non-functional test suite(s) to run in each browser | ||
suites: [ 'generator-dojo/test/load', 'generator-dojo/test/creation' ], | ||
|
||
// Functional test suite(s) to run in each browser once non-functional tests are completed | ||
functionalSuites: [ /* 'myPackage/tests/functional' */ ], | ||
|
||
// A regular expression matching URLs to files that should not be included in code coverage analysis | ||
excludeInstrumentation: /^tests\// | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
define([ | ||
'intern!object', | ||
'intern/chai!assert', | ||
'intern/node_modules/dojo/node!../../../../../app' | ||
], function (registerSuite, assert, app) { | ||
registerSuite({ | ||
name: 'load', | ||
|
||
'import': function () { | ||
assert(app !== undefined); | ||
} | ||
}); | ||
}); |