Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove coffeescript, point at compiled file
  • Loading branch information
searls committed Nov 23, 2017
1 parent 4406155 commit a8bfcd8
Show file tree
Hide file tree
Showing 22 changed files with 243 additions and 1,226 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Expand Up @@ -3,6 +3,3 @@ npm-debug.log*
#ignore node_modules, as the node project is not "deployed" per se: http://www.mikealrogers.com/posts/nodemodules-in-git.html
/node_modules

#ignore generated from git, include it in npm
/lib

Empty file removed .npmignore
Empty file.
3 changes: 1 addition & 2 deletions example/lib/animals/bear.js
@@ -1,2 +1 @@
module.exports = function(){ return "a real bear"; };

module.exports = function () { return 'a real bear' }
2 changes: 1 addition & 1 deletion example/lib/animals/lion.js
@@ -1 +1 @@
module.exports = function(){ return "a real lion"; };
module.exports = function () { return 'a real lion' }
8 changes: 4 additions & 4 deletions example/lib/zoo.js
@@ -1,11 +1,11 @@
var lion = require('./animals/lion'),
bear = require('./animals/bear');
bear = require('./animals/bear')

module.exports = function(){
module.exports = function () {
return {
animals: [
lion(),
bear()
]
};
};
}
}
22 changes: 11 additions & 11 deletions example/test/helper.js
@@ -1,16 +1,16 @@
global.expect = require('chai').expect;
global.context = describe;
quibble = require('quibble');
global.expect = require('chai').expect
global.context = describe
quibble = require('quibble')

beforeEach(function(){
beforeEach(function () {
// Config a default response for quibbles (usually in a spec helper)
quibble.config({
defaultFakeCreator: function(path) {
return function() { return 'a fake animal' };
defaultFakeCreator: function (path) {
return function () { return 'a fake animal' }
}
});
});
})
})

afterEach(function(){
quibble.reset();
});
afterEach(function () {
quibble.reset()
})
33 changes: 16 additions & 17 deletions example/test/lib/zoo-spec.js
@@ -1,23 +1,22 @@
quibble = require('quibble');
quibble = require('quibble')

require('../../lib/zoo'); //drop the zoo in the cache
require('../../lib/zoo') // drop the zoo in the cache

describe('zoo', function(){
var subject;
describe('zoo', function () {
var subject

beforeEach(function(){
quibble('../../lib/animals/bear'); //return ->'a fake animal'; see helper.js
quibble('../../lib/animals/lion', function(){ return 'a fake lion'});
beforeEach(function () {
quibble('../../lib/animals/bear') // return ->'a fake animal'; see helper.js
quibble('../../lib/animals/lion', function () { return 'a fake lion' })

subject = require('../../lib/zoo');
});
subject = require('../../lib/zoo')
})

it('contains a fake animal', function() {
expect(subject().animals).to.contain('a fake animal');
});
it('contains a fake animal', function () {
expect(subject().animals).to.contain('a fake animal')
})

it('contains a fake lion', function() {
expect(subject().animals).to.contain('a fake lion');
});

});
it('contains a fake lion', function () {
expect(subject().animals).to.contain('a fake lion')
})
})
4 changes: 1 addition & 3 deletions index.js
@@ -1,3 +1 @@
// lib is generated by coffee-script in src/. Generate lib from src changes with
// $ npm run compile
module.exports = require('./lib/quibble');
module.exports = require('./lib/quibble')
175 changes: 175 additions & 0 deletions lib/quibble.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 11 additions & 22 deletions package.json
Expand Up @@ -3,23 +3,14 @@
"version": "0.5.1",
"description": "Makes it easy to replace require'd dependencies.",
"homepage": "https://github.com/testdouble/quibble",
"config": {
"mocha_reporter": "dot"
},
"scripts": {
"clean": "rm -rf lib",
"start": "testem",
"compile": "coffee -o lib -c src",
"test": "mocha -u mocha-given -R $npm_package_config_mocha_reporter --compilers coffee:coffee-script --recursive test/helper.coffee test/src/",
"test:unit": "yarn run compile && teenytest",
"pretest:example": "yarn run compile && cd example && yarn install",
"style": "standard test/lib/** --fix",
"test:example": "cd example && yarn test",
"test:dependents": "yarn run compile && dont-break --timeout 400",
"test": "teenytest",
"style": "standard --fix",
"test:example": "cd example && yarn install && yarn test",
"test:dependents": "dont-break --timeout 400",
"test:smells": "./test/require-smell-test.sh",
"test:ci": "yarn test && yarn run test:example && yarn run test:smells && yarn run test:dependents",
"preversion": "git pull --rebase && yarn run test:ci",
"prepublish": "yarn run clean && yarn run compile",
"postversion": "git push && git push --tags && yarn publish"
},
"author": {
Expand All @@ -31,21 +22,19 @@
"lodash": "^4.17.2"
},
"devDependencies": {
"chai": "^3.3.0",
"coffee-script": "^1.10.0",
"core-assert": "^0.2.1",
"dont-break": "searls/dont-break",
"is-number": "^3.0.0",
"mocha": "^2.3.3",
"mocha-given": "^0.1.3",
"pryjs": "^1.0.3",
"resolve": "^1.5.0",
"standard": "^10.0.3",
"teenytest": "^5.0.2",
"testem": "^0.9.7"
"teenytest": "^5.0.2"
},
"standard": {
"globals": ["assert"]
"globals": [
"assert"
],
"ignore": [
"example"
]
},
"bugs": {
"url": "https://github.com/testdouble/quibble/issues"
Expand Down

0 comments on commit a8bfcd8

Please sign in to comment.