File tree Expand file tree Collapse file tree 4 files changed +56
-5
lines changed Expand file tree Collapse file tree 4 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
2
node_modules
3
+ test /temp
Original file line number Diff line number Diff line change 1
- # jQuery generator
1
+ # jQuery generator [ ![ Build Status ] ( https://secure.travis-ci.org/zenorocha/generator-jquery.png?branch=master )] ( https://travis-ci.org/zenorocha/generator-jquery )
2
2
3
3
> A Yeoman generator that provides a functional boilerplate to easily create jQuery plugins out of the box.
4
4
@@ -17,7 +17,9 @@ Check [jQuery Boilerplate's](http://github.com/jquery-boilerplate/boilerplate) r
17
17
18
18
## History
19
19
20
- * v0.0.1 May 10, 2013
20
+ * v0.1.0 May 10, 2013
21
+ * Added continous integration using [Travis](https://travis-ci.org/)
22
+ * Added tests using [Mocha](http://visionmedia.github.io/mocha/)
21
23
* Published package on [NPM](https://npmjs.org/package/generator-jquery)
22
24
* Cloned Addy's [Generator Boilerplate](https://github.com/addyosmani/generator-boilerplate)
23
25
Original file line number Diff line number Diff line change 17
17
"name" : " Zeno Rocha" ,
18
18
19
19
},
20
- "engines" : {
21
- "node" : " >=0.8.0"
22
- },
23
20
"license" : [
24
21
{
25
22
"type" : " MIT" ,
26
23
"url" : " http://zenorocha.mit-license.org/"
27
24
}
28
25
],
26
+ "scripts" : {
27
+ "test" : " mocha --reporter spec"
28
+ },
29
+ "engines" : {
30
+ "node" : " >=0.8.0"
31
+ },
29
32
"dependencies" : {
30
33
"yeoman-generator" : " ~0.10.2"
34
+ },
35
+ "devDependencies" : {
36
+ "mocha" : " ~1.9.0"
31
37
}
32
38
}
Original file line number Diff line number Diff line change
1
+ /* global describe, beforeEach, it */
2
+ 'use strict' ;
3
+
4
+ var path = require ( 'path' ) ;
5
+ var helpers = require ( 'yeoman-generator' ) . test ;
6
+
7
+ describe ( 'jQuery generator test' , function ( ) {
8
+ beforeEach ( function ( done ) {
9
+ helpers . testDirectory ( path . join ( __dirname , 'temp' ) , function ( err ) {
10
+ if ( err ) {
11
+ return done ( err ) ;
12
+ }
13
+
14
+ this . app = helpers . createGenerator ( 'jquery:app' , [
15
+ '../../app'
16
+ ] ) ;
17
+ done ( ) ;
18
+ } . bind ( this ) ) ;
19
+ } ) ;
20
+
21
+ it ( 'creates expected files' , function ( done ) {
22
+ var expected = [
23
+ '.editorconfig' ,
24
+ '.gitignore' ,
25
+ '.jshintrc' ,
26
+ '.travis.yml' ,
27
+ 'Gruntfile.js' ,
28
+ 'boilerplate.jquery.json' ,
29
+ 'dist/jquery.boilerplate.js' ,
30
+ 'dist/jquery.boilerplate.min.js' ,
31
+ 'package.json' ,
32
+ 'src/jquery.boilerplate.coffee' ,
33
+ 'src/jquery.boilerplate.js'
34
+ ] ;
35
+
36
+ this . app . options [ 'skip-install' ] = true ;
37
+ this . app . run ( { } , function ( ) {
38
+ helpers . assertFiles ( expected ) ;
39
+ done ( ) ;
40
+ } ) ;
41
+ } ) ;
42
+ } ) ;
You can’t perform that action at this time.
0 commit comments