Skip to content

Commit

Permalink
Reorganize tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnab committed May 17, 2012
1 parent de320cb commit 6fd3e84
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
1 change: 1 addition & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"exports",
"location",
"describe",
"before",
"it"
]
}
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ deps:
npm install && git submodule init && git submodule update

test:
./node_modules/.bin/mocha
find test -name *_test.js | xargs ./node_modules/.bin/mocha $(OPTS)

autotest:
./node_modules/.bin/mocha -w
make test OPTS=-w

bundle:
node build/remark.js

.PHONY: deps test bundle
.PHONY: deps test autotest bundle
4 changes: 2 additions & 2 deletions test/config_test.js → test/remark/config_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var config = require('../src/remark/config')
, api = require('../src/remark/api')
var config = require('../../src/remark/config')
, api = require('../../src/remark/api')
;

describe('config', function () {
Expand Down
6 changes: 2 additions & 4 deletions test/converter_test.js → test/remark/converter_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/*global "describe": true, "it": true, "before": true */

var converter = require('../src/remark/converter')
, config = require('../src/remark/config')
var converter = require('../../src/remark/converter')
, config = require('../../src/remark/config')
;

describe('converter', function () {
Expand Down
10 changes: 5 additions & 5 deletions test/highlighter_test.js → test/remark/highlighter_test.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
var api = require('../src/remark/api')
, config = require('../src/remark/config')
, highlighter = require('../src/remark/highlighter')
, resources = require('../src/remark/resources')
var api = require('../../src/remark/api')
, config = require('../../src/remark/config')
, highlighter = require('../../src/remark/highlighter')
, resources = require('../../src/remark/resources')
;

describe('highlighter', function () {
it('should return default CSS if style is not set', function () {
config({highlightStyle: undefined});

highlighter.cssForStyle().should.equal(resources.highlighter.styles.default);
highlighter.cssForStyle().should.equal(resources.highlighter.styles['default']);
});

it('should return empty CSS if style is set to null', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/slide_test.js → test/remark/views/slide_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Slide = require('../src/remark/slide').Slide;
var Slide = require('../../../src/remark/slide').Slide;

describe('Slide', function () {
describe('properties', function () {
Expand Down

0 comments on commit 6fd3e84

Please sign in to comment.