-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
187 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"esnext": true, | ||
"requireCurlyBraces": [ | ||
"if", | ||
"else", | ||
"for", | ||
"while", | ||
"do", | ||
"try", | ||
"catch" | ||
], | ||
"requireOperatorBeforeLineBreak": true, | ||
"requireCamelCaseOrUpperCaseIdentifiers": true, | ||
"maximumLineLength": { | ||
"value": 90, | ||
"allowComments": true, | ||
"allowRegex": true | ||
}, | ||
"validateIndentation": 4, | ||
"validateQuoteMarks": "'", | ||
|
||
"disallowMultipleLineStrings": true, | ||
"disallowMixedSpacesAndTabs": true, | ||
"disallowTrailingWhitespace": true, | ||
"disallowSpaceAfterPrefixUnaryOperators": true, | ||
"disallowMultipleVarDecl": true, | ||
|
||
"requireSpaceAfterKeywords": [ | ||
"if", | ||
"else", | ||
"for", | ||
"while", | ||
"do", | ||
"switch", | ||
"return", | ||
"try", | ||
"catch" | ||
], | ||
"requireSpaceBeforeBinaryOperators": true, | ||
"requireSpaceAfterBinaryOperators": true, | ||
"requireSpacesInConditionalExpression": true, | ||
"requireLineFeedAtFileEnd": true, | ||
"disallowSpacesInsideObjectBrackets": "all", | ||
"disallowSpacesInsideArrayBrackets": "all", | ||
"disallowSpacesInsideParentheses": true, | ||
|
||
"disallowMultipleLineBreaks": true, | ||
|
||
"requireParenthesesAroundIIFE": true, | ||
|
||
"disallowKeywords": ["with"], | ||
|
||
"requireSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningRoundBrace": true, | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
|
||
"requireSpacesInNamedFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
|
||
"disallowSpacesInNamedFunctionExpression": { | ||
"beforeOpeningRoundBrace": true | ||
}, | ||
|
||
"requireSpacesInFunctionDeclaration": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
|
||
"disallowSpacesInFunctionDeclaration": { | ||
"beforeOpeningRoundBrace": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"globals": { }, | ||
"node": true, | ||
"regexdash": true, | ||
"browser": true, | ||
"sub": true, | ||
"curly": true, | ||
"camelcase": true, | ||
"eqeqeq": true, | ||
"forin": true, | ||
"newcap": true, | ||
"immed": true, | ||
"indent": false, | ||
"latedef": "nofunc", | ||
"noarg": true, | ||
"plusplus": false, | ||
"quotmark": "single", | ||
"undef": true, | ||
"unused": true, | ||
"strict": false, | ||
"trailing": false, | ||
"maxparams": false, | ||
"maxdepth": false, | ||
"maxstatements": false, | ||
"maxcomplexity": false, | ||
"maxlen": 200, | ||
"asi": false, | ||
"boss": false, | ||
"debug": true, | ||
"eqnull": false, | ||
"esnext": false, | ||
"evil": false, | ||
"funcscope": false, | ||
"smarttabs": false, | ||
"shadow": true, | ||
"supernew": true, | ||
"devel": true, | ||
"node": true, | ||
"white": false, | ||
"laxbreak": true, | ||
"validthis": true, | ||
"esnext": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ignore/ | ||
.idea/ | ||
*.sublime-project | ||
*.sublime-workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
}); | ||
|
||
exports['default'] = function (chai, utils) { | ||
utils.addMethod(chai.assert, 'calledOnce', function (actual, expected, msg) { | ||
new chai.Assertion(actual).to.have.been.called.once(msg); | ||
}); | ||
|
||
utils.addMethod(chai.assert, 'notCalledOnce', function (actual, expected, msg) { | ||
new chai.Assertion(actual).not.to.have.been.called.once(msg); | ||
}); | ||
}; | ||
|
||
module.exports = exports['default']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "chai-spies-tdd", | ||
"version": "0.0.0", | ||
"author": "Eryk Napierala", | ||
"description": "TDD-style interface for chai-spies.", | ||
"license": "MIT", | ||
"homepage": "https://github.com/erykpiast/chai-spies-tdd", | ||
"bugs": "https://github.com/erykpiast/chai-spies-tdd/issues", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/erykpiast/chai-spies-tdd" | ||
}, | ||
"keywords": [ | ||
"cyclejs", | ||
"streams", | ||
"group" | ||
], | ||
"main": "dist/chai-spies-tdd.js", | ||
"peerDependencies": { | ||
"chai-spies": ">=0.6" | ||
}, | ||
"devDependencies": { | ||
"babel": "~5.2", | ||
"jscs": "~1.12", | ||
"jshint": "~2.7" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"jshint": "jshint src/", | ||
"jscs": "jscs src/", | ||
"precompile": "rm -rf dist/ && mkdir -p dist", | ||
"compile": "babel -d dist/ src/", | ||
"prepublish": "npm run compile", | ||
"release": "npm run release-patch", | ||
"release-patch": "git checkout master && npm run compile; git commit -a -m 'Build dist/'; npm version patch && git push origin master --tags && npm publish", | ||
"release-minor": "git checkout master && npm run compile; git commit -a -m 'Build dist/'; npm version minor && git push origin master --tags && npm publish", | ||
"release-major": "git checkout master && npm run compile; git commit -a -m 'Build dist/'; npm version major && git push origin master --tags && npm publish" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default function (chai, utils) { | ||
utils.addMethod(chai.assert, 'calledOnce', function (actual, expected, msg) { | ||
new chai.Assertion(actual).to.have.been.called.once(msg); | ||
}); | ||
|
||
utils.addMethod(chai.assert, 'notCalledOnce', function (actual, expected, msg) { | ||
new chai.Assertion(actual).not.to.have.been.called.once(msg); | ||
}); | ||
} |