Skip to content

Commit

Permalink
Merge pull request #43 from Medium/nick-update
Browse files Browse the repository at this point in the history
Upgrade kew for node 0.12
  • Loading branch information
nicks committed Feb 12, 2015
2 parents 2f407ea + 2ec9ba5 commit 59659db
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- "0.12"
- "0.10"
- "0.8"

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
kew: a lightweight (and super fast) promise/deferred framework for node.js
==================================

[![Build Status](https://travis-ci.org/Medium/kew.svg)](https://travis-ci.org/Medium/kew)

**kew** is a lightweight promise framework with an aim of providing a base set of functionality similar to that provided by the [Q library](https://github.com/kriskowal/q "Q").

A few answers (for a few questions)
Expand Down
2 changes: 1 addition & 1 deletion kew.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function getNextTickFunction () {
/**
* Used for overriding the nextTick function from outside the kew module so that
* the user can plug and play lower level schedulers
* @param {Function} fn
* @param {!Function} fn
*/
function setNextTickFunction (fn) {
nextTick = fn
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "kew",
"description": "a lightweight promise library for node",
"version": "0.5.0-alpha.1",
"homepage": "https://github.com/Obvious/kew",
"version": "0.5.0",
"homepage": "https://github.com/Medium/kew",
"authors": [
"Jeremy Stanley <[email protected]> (https://github.com/azulus)",
"Nick Santos <[email protected]>",
Expand All @@ -16,12 +16,12 @@
"main": "./kew.js",
"repository": {
"type": "git",
"url": "https://github.com/Obvious/kew.git"
"url": "https://github.com/Medium/kew.git"
},
"dependencies": {},
"devDependencies": {
"q": "0.9.7",
"nodeunit": "0.8.1",
"nodeunit": "0.9.0",
"closure-npc": "0.1.5"
},
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion test/later.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ exports.testAsynchronousSynchronous = function (test) {
}

exports.testSetImmediate = function (test) {
if (typeof setImmediate == 'undefined') {
test.done()
return
}

Q.setNextTickFunction(setImmediate)

var number = 5
Expand All @@ -38,4 +43,3 @@ exports.testSetImmediate = function (test) {
test.done()
})
}

6 changes: 5 additions & 1 deletion test/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ exports.testDelay = function (test) {
})
.then(function (returnVal) {
test.equal(returnVal, val, "Val should be passed through")
test.equal(Date.now() - startTime >= 1000, true, "Should have waited a second")

var diff = Date.now() - startTime

// clock granularity may be off by 15
test.equal(diff >= 1000 - 15, true, "Should have waited a second. Actually waited " + diff)
test.done()
})
}
Expand Down

0 comments on commit 59659db

Please sign in to comment.