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

moved it tests to a separate dir, and separated test tasks in grunt #3

Merged
merged 2 commits into from
Feb 26, 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/target
.idea/*
*.iml
app/node_modules/
/node_modules/

npm-debug.log
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
language: node_js
node_js:
- "0.12"
- "0.12"
before_install: npm install -g grunt-cli
18 changes: 10 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ module.exports = function (grunt) {
},
mochaTest: {
test: {
src: ['app/test/**/*.js', 'app/it/**/*.js'],
src: ['app/test/**/Test*.js'],
options: {
reporter: 'spec'
}
},
it: {
src: ['app/it/**/Test*.js'],
options: {
reporter: 'spec'
}
Expand All @@ -23,11 +29,6 @@ module.exports = function (grunt) {
tasks: ['lint', 'test']
}
},
'node-inspector': {
dev: {
"debug-port": 3000
}
},
express: {
dev: {
options: {
Expand All @@ -44,7 +45,8 @@ module.exports = function (grunt) {

grunt.registerTask('start', ['express:dev', 'watch']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('test', ['mochaTest']);
grunt.registerTask('default', ['jshint', 'mochaTest']);
grunt.registerTask('test', ['mochaTest:test']);
grunt.registerTask('it', ['mochaTest:it']);
grunt.registerTask('default', ['lint', 'test', 'it']);

};
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
Breadboard uses JSON Schema to define object models and the possible links associated with them, and then auto-generates MongoDB persistence code and Express RESTful service code in node.js.
It uses RQL to allow very simple query matchers to determine if a given link should be present on a response object, hence expressing all application state via the responses.
[![Build Status](https://travis-ci.org/atsid/breadboard.svg?branch=master)](https://travis-ci.org/atsid/breadboard)

Breadboard is a rapid-prototyping platform for Node.js applications that include RESTful services with hypermedia.

JSON Schema is used to define object models and the possible links associated with them, and then Breadboard auto-generates MongoDB persistence code and Express RESTful service middleware.
RQL is used to allow very simple query matchers to determine if a given link should be present on a response object, hence expressing all application state via the responses.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

var assert = require("assert"),
helpers = require("../helpers");
helpers = require("./helpers");

describe("Application HTTP requests", function () {

Expand Down
2 changes: 1 addition & 1 deletion app/test/it/TestGetAll.js → app/it/TestGetAll.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

var assert = require("assert"),
helpers = require("../helpers"),
helpers = require("./helpers"),
async = require("async");

/**
Expand Down
3 changes: 1 addition & 2 deletions app/test/it/TestProductList.js → app/it/TestProductList.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"use strict";

var assert = require("assert"),
helpers = require("../helpers"),
links = require("../../util/links");
helpers = require("./helpers");

describe("ProductList HTTP requests", function () {

Expand Down
4 changes: 2 additions & 2 deletions app/test/it/TestUser.js → app/it/TestUser.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";

var assert = require("assert"),
helpers = require("../helpers"),
links = require("../../util/links");
helpers = require("./helpers"),
links = require("../util/links");

describe("User HTTP requests", function () {

Expand Down
2 changes: 1 addition & 1 deletion app/test/it/TestUserList.js → app/it/TestUserList.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

var assert = require("assert"),
helpers = require("../helpers");
helpers = require("./helpers");

describe("UserList HTTP requests", function () {

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": false,
"scripts": {
"start": "node dev-server.js",
"test": "node -e \"require('grunt').tasks(['lint']);\""
"test": "grunt lint test"
},
"main": "app/main.js",
"license": "Apache-2.0",
Expand Down