Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added some more tests

  • Loading branch information...
commit 5ac0858a0764e3bbee4c1f4fd8c8e53477ca2756 1 parent 6987ee8
@asciidisco authored
View
4 .travis.yml
@@ -1,5 +1,3 @@
language: node_js
node_js: 0.8
-before_script:
- - "export DISPLAY=:99.0"
- - "npm install"
+before_script: "npm install"
View
10 AUTHORS.md
@@ -1 +1,11 @@
Sebastian Golasch (http://github.com/asciidisco)
+
+Contributors:
+indieisaconcept
+Jörn Zaefferer (https://github.com/jzaefferer)
+Lauri Piispanen (https://github.com/lauripiispanen)
+bernos (https://github.com/bernos)
+Christopher Rogers (https://github.com/chrissrogers)
+Sven Lito (https://github.com/svnlto)
+Kengo TODA (https://github.com/eller86)
+Rodrigo Espinosa (https://github.com/RodEsp)
View
93 CHANGELOG
@@ -1,21 +1,88 @@
-v0.1.3:
- date: 2012-11-23
+v0.3.0:
+ commit:
+ date: 2012-10-01
changes:
- - Added testsuite
- - Fixed issues regarding the removal of the extend method (Builds without view)
- - Fixed issues of the Router only build not working
+ -
-v0.1.2:
- date: 2012-11-22
+v0.2.14:
+ commit: c6258f7a00d2fdb7927e5b9c3be3dc75546f1a98
+ date: 2012-10-01
changes:
- - Fixed filename reference in package.json
+ - fixes package.json dependecy versions
-v0.1.1:
- date: 2012-11-22
+v0.2.13:
+ commit: ad323ceba047a8013743e289b979ce49ac1b4bb1
+ date: 2012-10-01
changes:
- - ´include´ definition is now case insensitive
+ - fixes according to the changes from the last cheerio release
+
+v0.2.12:
+ commit: f3e1b00e2b60d95b7416515a26871632140e036b
+ date: 2012-09-25
+ changes:
+ - fixes issue of r.js almond-based dependency mixup (added by @chrissrogers)
+
+v0.2.11:
+ commit: 85d8f22c821f237546be5bc48f94f6437c46f480
+ date: 2012-09-13
+ changes:
+ - Fixed issue #17 (almond: false, causes build to fail)
+ - Added example projects
+
+v0.2.10:
+ commit: 8ec0309075de55371f030742a3dd4fe6d9b30c16
+ date: 2012-09-10
+ changes:
+ - Fixed issue #4
+ - Fixed issue #8
+
+v0.2.9:
+ commit: e61c4ec1965747a2f25f4130dc48c6afdc4c3229
+ date: 2012-07-10
+ changes:
+ - Removed jQuery dependency and replaced it with cheerio
+ - Updated versions of 3rd party libs
+
+v0.2.8:
+ commit: ef4f28bcfbed595f8d732096047241251678c915
+ date: 2012-05-29
+ changes:
+ - RequireJS Version bump to 2.0
+
+v0.2.7:
+ commit: 05f5c8b67e6e89c505de47e7c64bfe823d8b56ea
+ date: 2012-05-29
+ changes:
+ - Removed npm dependency for tracing the almond file
+ - Added some informations in the readme about the almond 'wrap=true'
+
+v0.2.6:
+ commit: 52096b00d5b56d40b4fb4f5057090471206a4523
+ date: 2012-05-21
+ changes:
+ - Added 'modulePath' configuration option for specifying your modules path
+ - Added 'modulePath' documentation
+
+v0.2.5:
+ commit: ef75f324a0d80667fcb0d4947f031f736767ea51
+ date: 2012-05-20
+ changes:
+ - Added dual config
+ - Optimized almond integration (removed npm dependency)
+ - Readme updates
+ - requirejs isnt a multi task anymore
+
+v0.2.0:
+ commit: e8ad44718c00c089f60ae0af03a46fd526ec9d5a
+ date: 2012-05-08
+ changes:
+ - Removed clearTarget (use grunt-contrib clean instead)
+ - Added [almond](https://github.com/jrburke/almond) integration
+ - Added automatic almond js module script tag replacement for html files
+ - Improved documentation
v0.1.0:
- date: 2012-11-22
+ commit:
+ date:
changes:
- - Initial release.
+ - Initial Release
View
8 CONTRIBUTING.md
@@ -26,10 +26,16 @@ Assuming that you don't see any red, you're ready to go. Just be sure to run `gr
1. Create a new branch, please don't work in your `master` or `devel` branch directly.
2. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.
3. Fix stuff.
-4. Run `grunt travis` to see if the tests pass. Repeat steps 2-4 until done.
+4. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.
5. Update the documentation to reflect any changes.
6. Push to your fork and submit a pull request.
+### Adding tests
+Tests are written in NodeUnit & QUnit style.
+NodeUnit tests can be run using the ´grunt test´ command.
+The tests from the examples directory can be run using ´grunt qunit´, but make sure
+you are running ´grunt setUp´ before & ´grunt tearDown´ afterwards.
+
### Syntax
* Two space indents. Don't use tabs anywhere. Use `\t` if you need a tab character in a string.
View
48 README.md
@@ -183,53 +183,7 @@ or
If no argument is specified, then the task will look for the approprate config in the following order, JS, CSS and then finally it will use whatever config has been defined if neither JS or CSS is found.
## Release History
-### 0.3.0
-+ fixes package.json dependecy versions
-
-### 0.2.13
-+ fixes package.json dependecy versions
-
-### 0.2.12
-+ fixes issue of r.js almond-based dependency mixup (added by @chrissrogers)
-
-### 0.2.11
-+ Fixed issue #17 (almond: false, causes build to fail)
-+ Added example projects
-
-### 0.2.10
-+ Fixed issue #4
-+ Fixed issue #8
-
-### 0.2.9
-+ Removed jQuery dependency and replaced it with cheerio
-+ Updated versions of 3rd party libs
-
-### 0.2.8
-+ RequireJS Version bump to 2.0
-
-### 0.2.7
-+ Removed npm dependency for tracing the almond file
-+ Added some informations in the readme about the almond 'wrap=true'
-
-### 0.2.6
-+ Added 'modulePath' configuration option for specifying your modules path
-+ Added 'modulePath' documentation
-
-### 0.2.5
-+ Added dual config
-+ Optimized almond integration (removed npm dependency)
-+ Readme updates
-+ requirejs isnt a multi task anymore
-
-### 0.2.0
-+ Removed clearTarget (use grunt-contrib clean instead)
-+ Added [almond](https://github.com/jrburke/almond) integration
-+ Added automatic almond js module script tag replacement for html files
-+ Improved documentation
-
-### 0.1.0
-+ Initial Release
## License
Copyright (c) 2012 asciidisco
-Licensed under the MIT license.
+Licensed under the MIT license.
View
2  lib/almondify.js
@@ -77,4 +77,4 @@ exports.init = function(grunt) {
return configClone;
};
-};
+};
View
1  tasks/require.js
@@ -43,6 +43,7 @@ module.exports = function (grunt) {
.then(almondify)
.then(optimize)
.then(replaceAlmondInHtmlFiles)
+ .then(this.data.cb || function () {})
.fail(errorHandler.bind({done: done}))
.fin(done)
.done();
View
19 test/require_test.js
@@ -123,9 +123,9 @@ exports['require'] = {
// test the output of the lodash builder
testLodashCustomBuilderOutput: function(test) {
'use strict';
- test.expect(2);
+ test.expect(2) ;
var config = {
- builder: {lodash:{include: ['each']}}
+ builder: {lodash: {include: ['each'] } }
};
Q.fcall(lodashCustomBuilder, config)
@@ -158,19 +158,20 @@ exports['require'] = {
.done();
},
- /*'almond helper runs callback even if almond: false': function(test) {
+ 'almond helper runs callback even if almond: false': function(test) {
'use strict';
- var wasCalled = false;
+ test.expect(1);
var config = {
modules: [],
almond: false,
cb: function() {
- wasCalled = true;
+ test.equal(true, true);
+ test.done();
}
};
- almondify(config);
- test.equal(true, wasCalled);
- test.done();
- }*/
+ Q.fcall(almondify, config)
+ .then(config.cb || function () {})
+ .done();
+ }
};
Please sign in to comment.
Something went wrong with that request. Please try again.