Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate test coverage for the CoffeeScript code #2

Merged
merged 1 commit into from
May 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NODEJS = node
COFFEE = $(NODE_BIN)/coffee
BROWSERIFY = $(NODE_BIN)/browserify
DOCCO = $(NODE_BIN)/docco
JASMINE = $(NODE_BIN)/jasmine-node
MOCHA = $(NODE_BIN)/_mocha
ISTANBUL = $(NODE_BIN)/istanbul

SCRIPTS = \
Expand Down Expand Up @@ -61,6 +61,7 @@ doc: $(DOCS)
cp -r ./pic ./doc/

.SECONDARY:
.PHONY: test

lib/%.js: src/%.litcoffee
@mkdir -p $(@D)
Expand Down Expand Up @@ -124,10 +125,14 @@ clean:
find . -name "*~" -exec rm -f {} \;

test:
NODE_PATH="$(NODE_PATH):.." $(JASMINE) spec --verbose --coffee
$(MOCHA) \
--recursive --compilers coffee:coffee-script/register

test-coverage:
NODE_PATH="$(NODE_PATH):.." $(ISTANBUL) cover --root ./lib $(JASMINE) spec -- --verbose --coffee
$(ISTANBUL) cover $(MOCHA) -- \
--recursive --compilers coffee:coffee-script/register \
--require coffee-coverage/register-istanbul
$(ISTANBUL) report text lcov

upload-doc: doc
ncftpput -R -m -u u48595320 sinusoid.es /mixco doc/*
113 changes: 63 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,65 @@
{
"author": "Juan Pedro Bolivar Puente",
"name": "mixco",
"description": "Mixco is a framework for creating hardware controller scripts for the amazing Mixxx DJ software using Literate CoffeeScript",
"contributors": [
{
"name": "Juan Pedro Bolivar Puente",
"email": "raskolnikov@gnu.org"
}
],
"version": "0.0.1",
"keywords": [
"mixxx",
"coffee",
"literate"
],
"repository": {
"type": "git",
"url": "https://github.com/arximboldi/mixco"
},
"engines": {
"node": ">=0.10"
},
"dependencies": {
"underscore": ">=1.3.0",
"heterarchy": ">=1.0.3",
"coffee-script": "latest",
"browserify": ">=10.1.3"
},
"devDependencies": {
"jasmine-node": ">=1.0.26",
"docco": ">=0.6",
"istanbul": "0.3.5",
"coveralls": "2.10.0"
},
"scripts": {
"test": "make test",
"test-coverage": "make test-coverage",
"install": "make"
},
"files": [
"lib"
],
"preferGlobal": true,
"main": "lib/index.js",
"files": ["lib", "bin", "src", "spec", "makefile" ],
"bin": {
"mixco": "./bin/mixco.js"
},
"directories":{"doc":"./doc","man":"./man","lib":"./lib","bin":"./bin"},
"license": "GPL"
"author": "Juan Pedro Bolivar Puente",
"name": "mixco",
"description": "Mixco is a framework for creating hardware controller scripts for the amazing Mixxx DJ software using Literate CoffeeScript",
"contributors": [
{
"name": "Juan Pedro Bolivar Puente",
"email": "raskolnikov@gnu.org"
}
],
"version": "0.0.1",
"keywords": [
"mixxx",
"coffee",
"literate"
],
"repository": {
"type": "git",
"url": "https://github.com/arximboldi/mixco"
},
"engines": {
"node": ">=0.10"
},
"dependencies": {
"browserify": ">=10.1.3",
"coffee-script": "latest",
"heterarchy": ">=1.0.3",
"underscore": ">=1.3.0"
},
"devDependencies": {
"chai": "^2.3.0",
"chai-spies": "^0.6.0",
"coffee-coverage": "^0.6.0",
"coveralls": "2.10.0",
"docco": ">=0.6",
"istanbul": "0.3.5",
"mocha": "^2.2.5",
"sinon": "^1.14.1",
"sinon-chai": "^2.7.0"
},
"scripts": {
"test": "make test",
"test-coverage": "make test-coverage",
"install": "make"
},
"files": [
"lib",
"bin",
"src",
"spec",
"makefile"
],
"preferGlobal": true,
"main": "lib/index.js",
"bin": {
"mixco": "./bin/mixco.js"
},
"directories": {
"doc": "./doc",
"man": "./man",
"lib": "./lib",
"bin": "./bin"
},
"license": "GPL"
}
10 changes: 5 additions & 5 deletions script/korg_nanokontrol2.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ using the [NodeJS,
**require**](http://nodejs.org/api/modules.html#modules_module_require_id)
function.

{assert} = require 'mixco/lib/util'
script = require 'mixco/lib/script'
control = require 'mixco/lib/control'
behaviour = require 'mixco/lib/behaviour'
value = require 'mixco/lib/value'
{assert} = require '../src/util'
script = require '../src/script'
control = require '../src/control'
behaviour = require '../src/behaviour'
value = require '../src/value'

Also, lets define these couple of shortcuts to save typing.

Expand Down
10 changes: 5 additions & 5 deletions script/maudio_xponent.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ functionallity of the controls.

![Xponent Layout](../pic/maudio_xponent.png)

{assert} = require 'mixco/lib/util'
script = require 'mixco/lib/script'
{assert} = require '../src/util'
script = require '../src/script'

c = require 'mixco/lib/control'
b = require 'mixco/lib/behaviour'
v = require 'mixco/lib/value'
c = require '../src/control'
b = require '../src/behaviour'
v = require '../src/value'

ledButtonFixed = ->
c.ledButton(arguments...).option
Expand Down
8 changes: 4 additions & 4 deletions script/novation_twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
// framework.

var _ = require('underscore')
var script = require('mixco/lib/script')
var c = require('mixco/lib/control')
var b = require('mixco/lib/behaviour')
var v = require('mixco/lib/value')
var script = require('../src/script')
var c = require('../src/control')
var b = require('../src/behaviour')
var v = require('../src/value')

// The script
// ----------
Expand Down
109 changes: 0 additions & 109 deletions spec/mock.litcoffee

This file was deleted.

Loading