Permalink
Browse files

Added testing

  • Loading branch information...
1 parent 7d31182 commit 33bf4abcdbdc7734588480344d4db35f98ca4ab6 @doug-martin committed Jan 21, 2013
Showing with 63 additions and 23 deletions.
  1. +44 −21 README.md
  2. +11 −1 package.json
  3. +7 −0 test/browserling.js
  4. +1 −1 test/extended.test.js
View
65 README.md
@@ -1,5 +1,7 @@
[![Build Status](https://travis-ci.org/doug-martin/extended.png?branch=master)](undefined)
+[![browser support](http://ci.testling.com/doug-martin/extended.png)](http://ci.testling.com/doug-martin/extended)
+
# extended
`extended` is a wrapper than sits on top of [`extender`](https://github.com/doug-martin/extender) than allows you to combine multiple libraries into a single API.
@@ -46,13 +48,13 @@ The following example makes use of
```javascript
var _ = extended()
- .register(require("array-extended")
- .register(require("string-extended")
- .register(require("date-extended")
- .register(require("function-extended")
- .register(require("is-extended")
- .register(require("object-extended")
- .register(require("promise-extended");
+ .register(require("array-extended"))
+ .register(require("string-extended"))
+ .register(require("date-extended"))
+ .register(require("function-extended"))
+ .register(require("is-extended"))
+ .register(require("object-extended"))
+ .register(require("promise-extended"));
//now use your API!
@@ -77,13 +79,13 @@ If you want to namespace you API you can provide an alias.
```javascript
var _ = extended()
- .register("array", require("array-extended")
- .register("string", require("string-extended")
- .register("date", require("date-extended")
- .register("fn", require("function-extended")
- .register("is", require("is-extended")
- .register("obj", require("object-extended")
- .register("promise", require("promise-extended");
+ .register("array", require("array-extended"))
+ .register("string", require("string-extended"))
+ .register("date", require("date-extended"))
+ .register("fn", require("function-extended"))
+ .register("is", require("is-extended"))
+ .register("obj", require("object-extended"))
+ .register("promise", require("promise-extended"));
//now use your API!
@@ -103,19 +105,40 @@ Suppose you dont want to use `promise-extended` but instead `Q`.
```javascript
var _ = extended()
- .register(require("array-extended")
- .register(require("string-extended")
- .register(require("date-extended")
- .register(require("function-extended")
- .register(require("is-extended")
- .register(require("object-extended")
- .register(require("q");
+ .register(require("array-extended"))
+ .register(require("string-extended"))
+ .register(require("date-extended"))
+ .register(require("function-extended"))
+ .register(require("is-extended"))
+ .register(require("object-extended"))
+ .register(require("q"));
_.resolve("hello").then(function(hello){
console.log("hello");
})
```
+Or maybe you want to continue to use `underscore` with added functionality.
+
+```javascript
+
+//lets create a library with _, promises and an inheritance library.
+var _ = extended()
+ .register(require("_"))
+ .register(require("is-extended"))
+ .register(require("promise-extended"))
+ .register(require("declare.js"));
+
+var Person = _.declare({
+ constructor: function(firstName, lastName){
+ this.firstName = firstName;
+ this.lastName = lastName;
+ }
+});
+
+var
+
+```
View
12 package.json
@@ -15,13 +15,23 @@
"extender",
"utilities"
],
+ "testling": {
+ "files": "test/browserling.js",
+ "browsers": {
+ "ie": [6, 7, 8, 9],
+ "chrome": [4, 23, "canary"],
+ "firefox": [3, 3.5, 3.6, 4, 17, "nightly"],
+ "opera": [10, 10.5, 11, 11.5, 11.6, 12, "next"],
+ "safari": ["5.0.1", 5.1]
+ }
+ },
"author": "Doug Martin",
"license": "MIT",
"dependencies": {
"extender": "0.0.4"
},
"devDependencies": {
- "it": "~0.1.0",
+ "it": "~0.2.0",
"grunt-it": "~0.2.0",
"is-extended": "0.0.1"
}
View
7 test/browserling.js
@@ -0,0 +1,7 @@
+var it = require("it");
+
+it.reporter("tap");
+
+require("./extended.test");
+
+it.run();
View
2 test/extended.test.js
@@ -40,6 +40,6 @@ it.describe("extended",function (it) {
});
-}).as(module).run();
+}).as(module);

0 comments on commit 33bf4ab

Please sign in to comment.