Comparing version 0.3.8 to 0.3.9
@@ -215,4 +215,3 @@ var Q = require('q'), | ||
this.work(job, plan) | ||
.then(onDone, onError) | ||
.end(); | ||
.done(onDone, onError); | ||
@@ -219,0 +218,0 @@ return this; |
{ | ||
"name": "apw", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"homepage": "http://github.com/bem/apw", | ||
@@ -20,3 +20,2 @@ "author": "Sergey Kryzhanovsky <skryzhanovsky@ya.ru> (http://github.com/afelix)", | ||
}, | ||
"main": "./lib/apw", | ||
"bin": { | ||
@@ -29,4 +28,4 @@ "apw": "./bin/apw" | ||
"dependencies": { | ||
"q": "~0.8.8", | ||
"coa": "0.3.x", | ||
"q": "~0.8.10", | ||
"coa": "~0.3.8", | ||
"inherit": "1", | ||
@@ -36,4 +35,6 @@ "node.extend": "1" | ||
"devDependencies": { | ||
"mocha": "1.0.x", | ||
"visionmedia-jscoverage": "*" | ||
"istanbul": "~0.1.11", | ||
"mocha-as-promised": "*", | ||
"mocha-istanbul": "*", | ||
"mocha": "~1.6.0" | ||
}, | ||
@@ -43,4 +44,9 @@ "optionalDependencies": {}, | ||
"test": "make test", | ||
"test-cover": "make test-cover" | ||
} | ||
"coverage": "make coverage" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT" | ||
} | ||
] | ||
} |
@@ -1,2 +0,2 @@ | ||
var APW = require(process.env.COVER? '../lib-cov/apw' : '../lib/apw'), | ||
var APW = require('..'), | ||
ASSERT = require('assert'), | ||
@@ -7,8 +7,13 @@ COMMON = require('./common'), | ||
getEmptyArch = COMMON.getEmptyArch, | ||
createNode = COMMON.createNode, | ||
createNode = COMMON.createNode; | ||
arch, | ||
plan, | ||
children, | ||
parents; | ||
/** | ||
* Mocha BDD interface. | ||
*/ | ||
/** @name describe @function */ | ||
/** @name it @function */ | ||
/** @name before @function */ | ||
/** @name after @function */ | ||
/** @name beforeEach @function */ | ||
/** @name afterEach @function */ | ||
@@ -53,2 +58,5 @@ function getArch1() { | ||
describe('Arch getters', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -67,3 +75,3 @@ arch = getSimpleArch(); | ||
it('getChildren() A', function() { | ||
children = arch.getChildren('A'); | ||
var children = arch.getChildren('A'); | ||
@@ -75,3 +83,3 @@ ASSERT.equal(children.length, 1); | ||
it('getParents() B', function() { | ||
parents = arch.getParents('B'); | ||
var parents = arch.getParents('B'); | ||
@@ -81,5 +89,9 @@ ASSERT.equal(parents.length, 1); | ||
}); | ||
}); | ||
describe('Arch.addNode()', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -96,5 +108,9 @@ arch = getSimpleArch(); | ||
}); | ||
}); | ||
describe('Arch.setNode()', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -128,5 +144,9 @@ arch = getArch1(); | ||
}); | ||
}); | ||
describe('Arch.replaceNode()', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -152,5 +172,9 @@ arch = getArch1(); | ||
}); | ||
}); | ||
describe('Node availability check', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -203,5 +227,9 @@ arch = getEmptyArch() | ||
}); | ||
}); | ||
describe('Node removal', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -230,5 +258,9 @@ arch = getSimpleArch(); | ||
}); | ||
}); | ||
describe('Node link', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -243,15 +275,18 @@ arch = getEmptyArch() | ||
it('link() B -> A', function() { | ||
children = arch.getChildren('A'); | ||
var children = arch.getChildren('A'), | ||
parents = arch.getParents('B'); | ||
ASSERT.equal(children.length, 1); | ||
ASSERT.equal(children[0], 'B'); | ||
parents = arch.getParents('B'); | ||
ASSERT.equal(parents.length, 1); | ||
ASSERT.equal(parents[0], 'A'); | ||
}); | ||
}); | ||
describe('Node unlink', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -267,5 +302,9 @@ arch = getSimpleArch() | ||
}); | ||
}); | ||
describe('Remove tree (simple arch)', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -293,5 +332,9 @@ arch = getArch1(); | ||
}); | ||
}); | ||
describe('Remove tree (not so simple arch)', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -323,7 +366,11 @@ arch = getArch2(); | ||
}); | ||
}); | ||
describe('Remove tree (simple arch + plan) unforced', function() { | ||
var plan; | ||
beforeEach(function() { | ||
arch = getArch1(); | ||
var arch = getArch1(); | ||
plan = arch.createPlan('A'); | ||
@@ -340,5 +387,9 @@ | ||
}); | ||
}); | ||
describe('Remove tree (rhombus arch)', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -360,5 +411,9 @@ arch = getEmptyArch() | ||
}); | ||
}); | ||
describe('Lock', function() { | ||
var arch; | ||
beforeEach(function() { | ||
@@ -380,2 +435,3 @@ arch = getEmptyArch(); | ||
}); | ||
}); |
@@ -1,3 +0,6 @@ | ||
var APW = require(process.env.COVER? '../lib-cov/apw' : '../lib/apw'); | ||
// Bootstrap mocha-as-promised | ||
require('mocha-as-promised')(require('mocha')); | ||
var APW = require('..'); | ||
var createNode = exports.createNode = function(id) { | ||
@@ -33,2 +36,2 @@ return { | ||
.addNode(createNode('C'), 'B'); | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
var APW = require(process.env.COVER? '../lib-cov/apw' : '../lib/apw'), | ||
var APW = require('..'), | ||
ASSERT = require('assert'), | ||
@@ -7,7 +7,13 @@ COMMON = require('./common'), | ||
getEmptyArch = COMMON.getEmptyArch, | ||
createNode = COMMON.createNode, | ||
createNode = COMMON.createNode; | ||
arch, | ||
plan, | ||
job; | ||
/** | ||
* Mocha BDD interface. | ||
*/ | ||
/** @name describe @function */ | ||
/** @name it @function */ | ||
/** @name before @function */ | ||
/** @name after @function */ | ||
/** @name beforeEach @function */ | ||
/** @name afterEach @function */ | ||
@@ -19,2 +25,5 @@ function getPlan() { | ||
describe('Jobs', function() { | ||
var job; | ||
beforeEach(function() { | ||
@@ -27,5 +36,9 @@ job = getPlan().nextJob(); | ||
}); | ||
}); | ||
describe('Operability', function() { | ||
var plan; | ||
beforeEach(function() { | ||
@@ -42,5 +55,9 @@ plan = getPlan(); | ||
}); | ||
}); | ||
describe('Node removal', function() { | ||
var plan; | ||
beforeEach(function() { | ||
@@ -65,5 +82,9 @@ plan = getPlan(); | ||
}); | ||
}); | ||
describe('Remove tree (simple plan)', function() { | ||
var arch, plan; | ||
beforeEach(function() { | ||
@@ -100,2 +121,5 @@ arch = getEmptyArch() | ||
describe('Lock', function() { | ||
var plan; | ||
beforeEach(function() { | ||
@@ -117,2 +141,3 @@ plan = getSimpleArch().createPlan('A'); | ||
}); | ||
}); |
var Q = require('q'), | ||
APW = require(process.env.COVER? '../lib-cov/apw' : '../lib/apw'), | ||
ASSERT = require('assert'), | ||
APW = require('..'), | ||
ASSERT = require('assert'); | ||
arch, | ||
plan, | ||
job; | ||
/** | ||
* Mocha BDD interface. | ||
*/ | ||
/** @name describe @function */ | ||
/** @name it @function */ | ||
/** @name before @function */ | ||
/** @name after @function */ | ||
/** @name beforeEach @function */ | ||
/** @name afterEach @function */ | ||
@@ -80,3 +86,3 @@ function getArch(state) { | ||
var state = []; | ||
Q.when(getAPW(getArch(state)).process('0A'), | ||
Q.done(getAPW(getArch(state)).process('0A'), | ||
function() { | ||
@@ -87,3 +93,3 @@ ASSERT.equal(state.length, 1); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
@@ -95,3 +101,3 @@ }); | ||
var state = []; | ||
Q.when(getAPW(getArch(state)).process('1A'), | ||
Q.done(getAPW(getArch(state)).process('1A'), | ||
function() { | ||
@@ -103,3 +109,3 @@ ASSERT.equal(state.length, 2); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
@@ -111,3 +117,3 @@ }); | ||
var state = []; | ||
Q.when(getAPW(getArch(state)).process('2A'), | ||
Q.done(getAPW(getArch(state)).process('2A'), | ||
function() { | ||
@@ -121,3 +127,3 @@ ASSERT.equal(state.length, 4); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
@@ -129,3 +135,3 @@ }); | ||
var state = []; | ||
Q.when(getAPW(getArch(state)).process('3A'), | ||
Q.done(getAPW(getArch(state)).process('3A'), | ||
function() { | ||
@@ -139,3 +145,3 @@ ASSERT.equal(state.length, 4); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
@@ -152,7 +158,7 @@ }); | ||
Q.when(apw.process('4B'), | ||
Q.done(apw.process('4B'), | ||
function() { | ||
done(); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
@@ -164,3 +170,3 @@ }); | ||
var state = []; | ||
Q.when(getAPW(getArch(state)).process('5A'), | ||
Q.done(getAPW(getArch(state)).process('5A'), | ||
function() { | ||
@@ -172,4 +178,4 @@ ASSERT.equal(state.length, 2); | ||
}, done | ||
).end(); | ||
); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
91655
20
0
2388
5
4
Updatedcoa@~0.3.8
Updatedq@~0.8.10