From 4d239a35acf79caf772744b8ae71dadeedd6a9a3 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sat, 26 Apr 2014 16:53:32 +0800 Subject: [PATCH 1/3] Drop support for Node.js 0.8. Add test for Node.js 0.11 --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20d2fb14ce..e5ff47685e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: node_js node_js: - - "0.8" - "0.10" -branches: - except: - - site - - gh-pages + - "0.11" before_script: - - npm install -g grunt-cli \ No newline at end of file + - npm install -g gulp +matrix: + allow_failures: + - node_js: "0.11" + fast_finish: true \ No newline at end of file From a5be253bd4112a54d4101bdaaef8ebfb9e928dc0 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sat, 26 Apr 2014 17:32:40 +0800 Subject: [PATCH 2/3] Switch to gulp --- .jshintrc | 3 +++ Gruntfile.js | 34 ---------------------------------- Makefile | 2 +- gulpfile.js | 37 +++++++++++++++++++++++++++++++++++++ package.json | 10 +++++----- tasks/mocha.js | 27 --------------------------- test/blog/package.json | 2 +- 7 files changed, 47 insertions(+), 68 deletions(-) create mode 100644 .jshintrc delete mode 100644 Gruntfile.js create mode 100644 gulpfile.js delete mode 100644 tasks/mocha.js diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000000..85a1c305ba --- /dev/null +++ b/.jshintrc @@ -0,0 +1,3 @@ +{ + "-W103": true +} \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 6dd518e800..0000000000 --- a/Gruntfile.js +++ /dev/null @@ -1,34 +0,0 @@ -module.exports = function(grunt){ - grunt.initConfig({ - mocha: { - lib: { - options: { - reporter: 'dot' - }, - src: ['test/**/*.test.js'] - } - }, - watch: { - mocha: { - files: ['lib/**/*.js', 'test/**/*.test.js'], - tasks: ['mocha:lib'] - }, - jshint: { - files: ['lib/**/*.js'], - tasks: ['jshint:lib'] - } - }, - jshint: { - options: { - '-W103': true - }, - lib: ['lib/**/*.js'] - } - }); - - require('load-grunt-tasks')(grunt); - grunt.loadTasks('tasks'); - - grunt.registerTask('test', ['mocha', 'jshint']); - grunt.registerTask('dev', ['watch']); -}; \ No newline at end of file diff --git a/Makefile b/Makefile index 74f5966e91..0a6a99c26c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ test: - grunt test + gulp test install: npm install diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000000..9d44e208a4 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,37 @@ +var gulp = require('gulp'), + jshint = require('gulp-jshint'), + mocha = require('gulp-mocha'), + path = require('path'); + +var lib = 'lib/**/*.js', + test = 'test/**/*.test.js'; + +gulp.task('hexo', function(callback){ + require('./lib/init')(path.join(__dirname, 'test', 'blog'), { + _: [], + silent: true, + debug: true + }, callback); +}); + +gulp.task('mocha', ['hexo'], function(){ + return gulp.src(test) + .pipe(mocha({ + reporter: 'dot', + ignoreLeaks: true + })); +}); + +gulp.task('jshint', function(){ + return gulp.src(lib) + .pipe(jshint()) + .pipe(jshint.reporter('jshint-stylish')) + .pipe(jshint.reporter('fail')); +}); + +gulp.task('watch', function(){ + gulp.watch(lib, ['mocha', 'jshint']); + gulp.watch(test, ['mocha']); +}); + +gulp.task('test', ['mocha', 'jshint']); \ No newline at end of file diff --git a/package.json b/package.json index 6eb1a719c6..2bd51228fe 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "hexo": "./bin/hexo" }, "scripts": { - "test": "grunt test" + "test": "gulp test" }, "directories": { "lib": "./lib", @@ -59,9 +59,9 @@ "mocha": "*", "chai": "*", "cheerio": "*", - "load-grunt-tasks": "~0.3.0", - "grunt": "~0.4.2", - "grunt-contrib-watch": "~0.5.3", - "grunt-contrib-jshint": "~0.8.0" + "gulp": "^3.6.2", + "gulp-jshint": "^1.5.5", + "gulp-mocha": "^0.4.1", + "jshint-stylish": "^0.1.5" } } diff --git a/tasks/mocha.js b/tasks/mocha.js deleted file mode 100644 index 4b8b51e024..0000000000 --- a/tasks/mocha.js +++ /dev/null @@ -1,27 +0,0 @@ -var Mocha = require('mocha'), - path = require('path'); - -module.exports = function(grunt){ - grunt.registerMultiTask('mocha', function(){ - var done = this.async(), - options = this.options(); - - var mocha = new Mocha(options); - - this.files.forEach(function(file){ - file.src.forEach(function(src){ - mocha.addFile(src); - }); - }); - - require('../lib/init')(path.join(path.dirname(__dirname), 'test', 'blog'), { - _: [], - silent: true, - debug: true - }, function(){ - mocha.run(function(failures){ - done(failures); - }); - }); - }); -}; \ No newline at end of file diff --git a/test/blog/package.json b/test/blog/package.json index cbed044e01..da96354722 100644 --- a/test/blog/package.json +++ b/test/blog/package.json @@ -1,6 +1,6 @@ { "name": "hexo", - "version": "2.5.2", + "version": "2.5.3", "private": true, "dependencies": {} } \ No newline at end of file From 91f6b8ddd68f47008a99466a3f98d806e2a49db4 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sat, 26 Apr 2014 17:42:16 +0800 Subject: [PATCH 3/3] Move test scripts to scripts folder --- gulpfile.js | 9 +++++++-- test/{core.test.js => scripts/core.js} | 9 +++++---- .../filter/auto_spacing.js} | 2 +- .../excerpt.test.js => scripts/filter/excerpt.js} | 2 +- .../filter/external_link.js} | 2 +- test/{helper/css.test.js => scripts/helper/css.js} | 2 +- test/{helper/date.test.js => scripts/helper/date.js} | 2 +- .../gravatar.test.js => scripts/helper/gravatar.js} | 2 +- test/{helper/is.test.js => scripts/helper/is.js} | 2 +- test/{helper/js.test.js => scripts/helper/js.js} | 2 +- test/{helper/link.test.js => scripts/helper/link.js} | 2 +- test/{helper/number.test.js => scripts/helper/number.js} | 2 +- test/{ => scripts}/i18n/default.json | 0 test/{i18n/i18n.test.js => scripts/i18n/i18n.js} | 2 +- test/{ => scripts}/i18n/zh-TW.json | 0 .../blockquote.test.js => scripts/tag/blockquote.js} | 2 +- test/{tag/code.test.js => scripts/tag/code.js} | 4 ++-- test/{tag/gist.test.js => scripts/tag/gist.js} | 2 +- test/{tag/iframe.test.js => scripts/tag/iframe.js} | 2 +- test/{tag/img.test.js => scripts/tag/img.js} | 2 +- .../include_code.test.js => scripts/tag/include_code.js} | 6 +++--- test/{tag/jsfiddle.test.js => scripts/tag/jsfiddle.js} | 2 +- test/{tag/link.test.js => scripts/tag/link.js} | 2 +- test/{tag/pullquote.test.js => scripts/tag/pullquote.js} | 2 +- test/{tag/raw.test.js => scripts/tag/raw.js} | 2 +- test/{tag/vimeo.test.js => scripts/tag/vimeo.js} | 2 +- test/{tag/youtube.test.js => scripts/tag/youtube.js} | 2 +- test/{util/file2.test.js => scripts/util/file2.js} | 2 +- test/{util/html_tag.test.js => scripts/util/html_tag.js} | 2 +- test/{util/yfm.test.js => scripts/util/yfm.js} | 2 +- 30 files changed, 41 insertions(+), 35 deletions(-) rename test/{core.test.js => scripts/core.js} (80%) rename test/{filter/auto_spacing.test.js => scripts/filter/auto_spacing.js} (91%) rename test/{filter/excerpt.test.js => scripts/filter/excerpt.js} (89%) rename test/{filter/external_link.test.js => scripts/filter/external_link.js} (92%) rename test/{helper/css.test.js => scripts/helper/css.js} (95%) rename test/{helper/date.test.js => scripts/helper/date.js} (98%) rename test/{helper/gravatar.test.js => scripts/helper/gravatar.js} (91%) rename test/{helper/is.test.js => scripts/helper/is.js} (96%) rename test/{helper/js.test.js => scripts/helper/js.js} (96%) rename test/{helper/link.test.js => scripts/helper/link.js} (94%) rename test/{helper/number.test.js => scripts/helper/number.js} (94%) rename test/{ => scripts}/i18n/default.json (100%) rename test/{i18n/i18n.test.js => scripts/i18n/i18n.js} (96%) rename test/{ => scripts}/i18n/zh-TW.json (100%) rename test/{tag/blockquote.test.js => scripts/tag/blockquote.js} (95%) rename test/{tag/code.test.js => scripts/tag/code.js} (92%) rename test/{tag/gist.test.js => scripts/tag/gist.js} (88%) rename test/{tag/iframe.test.js => scripts/tag/iframe.js} (95%) rename test/{tag/img.test.js => scripts/tag/img.js} (98%) rename test/{tag/include_code.test.js => scripts/tag/include_code.js} (85%) rename test/{tag/jsfiddle.test.js => scripts/tag/jsfiddle.js} (96%) rename test/{tag/link.test.js => scripts/tag/link.js} (97%) rename test/{tag/pullquote.test.js => scripts/tag/pullquote.js} (89%) rename test/{tag/raw.test.js => scripts/tag/raw.js} (79%) rename test/{tag/vimeo.test.js => scripts/tag/vimeo.js} (87%) rename test/{tag/youtube.test.js => scripts/tag/youtube.js} (87%) rename test/{util/file2.test.js => scripts/util/file2.js} (99%) rename test/{util/html_tag.test.js => scripts/util/html_tag.js} (92%) rename test/{util/yfm.test.js => scripts/util/yfm.js} (98%) diff --git a/gulpfile.js b/gulpfile.js index 9d44e208a4..c366bfa95c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,12 @@ var gulp = require('gulp'), path = require('path'); var lib = 'lib/**/*.js', - test = 'test/**/*.test.js'; + test = 'test/scripts/**/*.js'; + +var handleError = function(err){ + console.error(err.stack); + this.emit('end'); +} gulp.task('hexo', function(callback){ require('./lib/init')(path.join(__dirname, 'test', 'blog'), { @@ -19,7 +24,7 @@ gulp.task('mocha', ['hexo'], function(){ .pipe(mocha({ reporter: 'dot', ignoreLeaks: true - })); + }).on('error', handleError)); }); gulp.task('jshint', function(){ diff --git a/test/core.test.js b/test/scripts/core.js similarity index 80% rename from test/core.test.js rename to test/scripts/core.js index 4a7895f084..fd52531833 100644 --- a/test/core.test.js +++ b/test/scripts/core.js @@ -2,8 +2,9 @@ var path = require('path'), should = require('chai').should(); describe('Core', function(){ - var baseDir = path.join(__dirname, 'blog') + path.sep, - coreDir = path.dirname(__dirname) + path.sep; + var testDir = path.dirname(__dirname), + baseDir = path.join(testDir, 'blog') + path.sep, + coreDir = path.dirname(testDir) + path.sep; it('core_dir', function(){ hexo.core_dir.should.eql(coreDir); @@ -14,7 +15,7 @@ describe('Core', function(){ }); it('version', function(){ - hexo.version.should.eql(require('../package.json').version); + hexo.version.should.eql(require('../../package.json').version); }); it('base_dir', function(){ @@ -46,7 +47,7 @@ describe('Core', function(){ hexo.env.safe.should.be.false; hexo.env.silent.should.be.true; hexo.env.env.should.eql('development'); - hexo.env.version.should.eql(require('../package.json').version); + hexo.env.version.should.eql(require('../../package.json').version); hexo.env.init.should.be.true; }); }); \ No newline at end of file diff --git a/test/filter/auto_spacing.test.js b/test/scripts/filter/auto_spacing.js similarity index 91% rename from test/filter/auto_spacing.test.js rename to test/scripts/filter/auto_spacing.js index 42c1c9a00b..9960724403 100644 --- a/test/filter/auto_spacing.test.js +++ b/test/scripts/filter/auto_spacing.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Filter - auto_spacing', function(){ - var auto_spacing = require('../../lib/plugins/filter/auto_spacing'); + var auto_spacing = require('../../../lib/plugins/filter/auto_spacing'); before(function(){ hexo.config.auto_spacing = true; diff --git a/test/filter/excerpt.test.js b/test/scripts/filter/excerpt.js similarity index 89% rename from test/filter/excerpt.test.js rename to test/scripts/filter/excerpt.js index 6f105f3e64..a3b1bb754a 100644 --- a/test/filter/excerpt.test.js +++ b/test/scripts/filter/excerpt.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Filter - excerpt', function(){ - var excerpt = require('../../lib/plugins/filter/excerpt'); + var excerpt = require('../../../lib/plugins/filter/excerpt'); it('with tag', function(){ excerpt({ diff --git a/test/filter/external_link.test.js b/test/scripts/filter/external_link.js similarity index 92% rename from test/filter/external_link.test.js rename to test/scripts/filter/external_link.js index 615990b154..e9d8427af4 100644 --- a/test/filter/external_link.test.js +++ b/test/scripts/filter/external_link.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Filter - external_link', function(){ - var external_link = require('../../lib/plugins/filter/external_link'); + var external_link = require('../../../lib/plugins/filter/external_link'); it('internal link', function(){ external_link({ diff --git a/test/helper/css.test.js b/test/scripts/helper/css.js similarity index 95% rename from test/helper/css.test.js rename to test/scripts/helper/css.js index 1f4a4901b9..9ef1f86b23 100644 --- a/test/helper/css.test.js +++ b/test/scripts/helper/css.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Helper - css', function(){ - var css = require('../../lib/plugins/helper/css'); + var css = require('../../../lib/plugins/helper/css'); var genResult = function(arr){ var result = []; diff --git a/test/helper/date.test.js b/test/scripts/helper/date.js similarity index 98% rename from test/helper/date.test.js rename to test/scripts/helper/date.js index ac8347a9e7..b2c5a422f4 100644 --- a/test/helper/date.test.js +++ b/test/scripts/helper/date.js @@ -2,7 +2,7 @@ var moment = require('moment'), should = require('chai').should(); describe('Helper - date', function(){ - var date = require('../../lib/plugins/helper/date'), + var date = require('../../../lib/plugins/helper/date'), config = hexo.config; var genTimeTag = function(date, format){ diff --git a/test/helper/gravatar.test.js b/test/scripts/helper/gravatar.js similarity index 91% rename from test/helper/gravatar.test.js rename to test/scripts/helper/gravatar.js index 396e4e1cd0..112c927975 100644 --- a/test/helper/gravatar.test.js +++ b/test/scripts/helper/gravatar.js @@ -2,7 +2,7 @@ var crypto = require('crypto'), should = require('chai').should(); describe('Helper - gravatar', function(){ - var gravatar = require('../../lib/plugins/helper/gravatar'); + var gravatar = require('../../../lib/plugins/helper/gravatar'); var md5 = function(str){ return crypto.createHash('md5').update(str).digest('hex'); diff --git a/test/helper/is.test.js b/test/scripts/helper/is.js similarity index 96% rename from test/helper/is.test.js rename to test/scripts/helper/is.js index d9c1fbfd3b..0c89d69044 100644 --- a/test/helper/is.test.js +++ b/test/scripts/helper/is.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Helper - is', function(){ - var is = require('../../lib/plugins/helper/is'), + var is = require('../../../lib/plugins/helper/is'), config = hexo.config; it('is_current', function(){ diff --git a/test/helper/js.test.js b/test/scripts/helper/js.js similarity index 96% rename from test/helper/js.test.js rename to test/scripts/helper/js.js index 460f6ca892..b15a35636b 100644 --- a/test/helper/js.test.js +++ b/test/scripts/helper/js.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Helper - js', function(){ - var js = require('../../lib/plugins/helper/js'); + var js = require('../../../lib/plugins/helper/js'); var genResult = function(arr){ var result = []; diff --git a/test/helper/link.test.js b/test/scripts/helper/link.js similarity index 94% rename from test/helper/link.test.js rename to test/scripts/helper/link.js index b595fd0431..0390c19b61 100644 --- a/test/helper/link.test.js +++ b/test/scripts/helper/link.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Helper - link', function(){ - var link = require('../../lib/plugins/helper/link'); + var link = require('../../../lib/plugins/helper/link'); describe('link_to', function(){ var link_to = link.link_to, diff --git a/test/helper/number.test.js b/test/scripts/helper/number.js similarity index 94% rename from test/helper/number.test.js rename to test/scripts/helper/number.js index 5a209e4eaf..10d9bf6022 100644 --- a/test/helper/number.test.js +++ b/test/scripts/helper/number.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Helper - number', function(){ - var number = require('../../lib/plugins/helper/number'); + var number = require('../../../lib/plugins/helper/number'); describe('number_format', function(){ it('default', function(){ diff --git a/test/i18n/default.json b/test/scripts/i18n/default.json similarity index 100% rename from test/i18n/default.json rename to test/scripts/i18n/default.json diff --git a/test/i18n/i18n.test.js b/test/scripts/i18n/i18n.js similarity index 96% rename from test/i18n/i18n.test.js rename to test/scripts/i18n/i18n.js index 02fa17da35..2887f86e6c 100644 --- a/test/i18n/i18n.test.js +++ b/test/scripts/i18n/i18n.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('i18n', function(){ - var I18n = require('../../lib/core/i18n'), + var I18n = require('../../../lib/core/i18n'), i18n = new I18n({code: 'zh-TW'}); ['default', 'zh-TW'].forEach(function(name){ diff --git a/test/i18n/zh-TW.json b/test/scripts/i18n/zh-TW.json similarity index 100% rename from test/i18n/zh-TW.json rename to test/scripts/i18n/zh-TW.json diff --git a/test/tag/blockquote.test.js b/test/scripts/tag/blockquote.js similarity index 95% rename from test/tag/blockquote.test.js rename to test/scripts/tag/blockquote.js index 5570acdf73..a7bdb32c34 100644 --- a/test/tag/blockquote.test.js +++ b/test/scripts/tag/blockquote.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - blockquote', function(){ - var blockquote = require('../../lib/plugins/tag/blockquote'); + var blockquote = require('../../../lib/plugins/tag/blockquote'); var raw = '123456 **bold** and *italic*'; diff --git a/test/tag/code.test.js b/test/scripts/tag/code.js similarity index 92% rename from test/tag/code.test.js rename to test/scripts/tag/code.js index 85db7718dd..7c2ec5f37c 100644 --- a/test/tag/code.test.js +++ b/test/scripts/tag/code.js @@ -1,9 +1,9 @@ var cheerio = require('cheerio'), should = require('chai').should(), - highlight = require('../../lib/util/highlight'); + highlight = require('../../../lib/util/highlight'); describe('Tag - code', function(){ - var code = require('../../lib/plugins/tag/code'); + var code = require('../../../lib/plugins/tag/code'); var dummy = [ 'var dummy = function(){', diff --git a/test/tag/gist.test.js b/test/scripts/tag/gist.js similarity index 88% rename from test/tag/gist.test.js rename to test/scripts/tag/gist.js index 89ba0878cf..fe183eb78d 100644 --- a/test/tag/gist.test.js +++ b/test/scripts/tag/gist.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - gist', function(){ - var gist = require('../../lib/plugins/tag/gist'); + var gist = require('../../../lib/plugins/tag/gist'); it('id', function(){ var $ = cheerio.load(gist(['foo'])); diff --git a/test/tag/iframe.test.js b/test/scripts/tag/iframe.js similarity index 95% rename from test/tag/iframe.test.js rename to test/scripts/tag/iframe.js index 23abe48942..35d90e07e7 100644 --- a/test/tag/iframe.test.js +++ b/test/scripts/tag/iframe.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - iframe', function(){ - var iframe = require('../../lib/plugins/tag/iframe'); + var iframe = require('../../../lib/plugins/tag/iframe'); it('url', function(){ var $ = cheerio.load(iframe(['http://zespia.tw'])); diff --git a/test/tag/img.test.js b/test/scripts/tag/img.js similarity index 98% rename from test/tag/img.test.js rename to test/scripts/tag/img.js index eba4505788..8a501ad9b4 100644 --- a/test/tag/img.test.js +++ b/test/scripts/tag/img.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - img', function(){ - var img = require('../../lib/plugins/tag/img'); + var img = require('../../../lib/plugins/tag/img'); it('src', function(){ var $ = cheerio.load(img(['http://placekitten.com/200/300'])); diff --git a/test/tag/include_code.test.js b/test/scripts/tag/include_code.js similarity index 85% rename from test/tag/include_code.test.js rename to test/scripts/tag/include_code.js index a76f845cf4..2ccc3dda93 100644 --- a/test/tag/include_code.test.js +++ b/test/scripts/tag/include_code.js @@ -1,11 +1,11 @@ var cheerio = require('cheerio'), path = require('path'), should = require('chai').should(), - file = require('../../lib/util/file2'), - highlight = require('../../lib/util/highlight'); + file = require('../../../lib/util/file2'), + highlight = require('../../../lib/util/highlight'); describe('include_code', function(){ - var include_code = require('../../lib/plugins/tag/include_code'), + var include_code = require('../../../lib/plugins/tag/include_code'), content = ''; before(function(done){ diff --git a/test/tag/jsfiddle.test.js b/test/scripts/tag/jsfiddle.js similarity index 96% rename from test/tag/jsfiddle.test.js rename to test/scripts/tag/jsfiddle.js index 6841645f3a..0bab4d9d3a 100644 --- a/test/tag/jsfiddle.test.js +++ b/test/scripts/tag/jsfiddle.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - jsfiddle', function(){ - var jsfiddle = require('../../lib/plugins/tag/jsfiddle'); + var jsfiddle = require('../../../lib/plugins/tag/jsfiddle'); it('id', function(){ var $ = cheerio.load(jsfiddle(['foo'])); diff --git a/test/tag/link.test.js b/test/scripts/tag/link.js similarity index 97% rename from test/tag/link.test.js rename to test/scripts/tag/link.js index 2430123d89..f675e691dc 100644 --- a/test/tag/link.test.js +++ b/test/scripts/tag/link.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - link', function(){ - var link = require('../../lib/plugins/tag/link'); + var link = require('../../../lib/plugins/tag/link'); it('text + url', function(){ var $ = cheerio.load(link('Click here to Google http://google.com'.split(' '))); diff --git a/test/tag/pullquote.test.js b/test/scripts/tag/pullquote.js similarity index 89% rename from test/tag/pullquote.test.js rename to test/scripts/tag/pullquote.js index ae632d409d..07ebc7a650 100644 --- a/test/tag/pullquote.test.js +++ b/test/scripts/tag/pullquote.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('pullquote', function(){ - var pullquote = require('../../lib/plugins/tag/pullquote'); + var pullquote = require('../../../lib/plugins/tag/pullquote'); var raw = '123456 **bold** and *italic*'; diff --git a/test/tag/raw.test.js b/test/scripts/tag/raw.js similarity index 79% rename from test/tag/raw.test.js rename to test/scripts/tag/raw.js index c19e1b50e6..b02f0d3c9e 100644 --- a/test/tag/raw.test.js +++ b/test/scripts/tag/raw.js @@ -1,7 +1,7 @@ var should = require('chai').should(); describe('Tag - raw', function(){ - var raw = require('../../lib/plugins/tag/raw'); + var raw = require('../../../lib/plugins/tag/raw'); it('content', function(){ raw([], '123456789strong987654321').should.eql('123456789strong987654321'); diff --git a/test/tag/vimeo.test.js b/test/scripts/tag/vimeo.js similarity index 87% rename from test/tag/vimeo.test.js rename to test/scripts/tag/vimeo.js index 70e65e1bf6..12be18815b 100644 --- a/test/tag/vimeo.test.js +++ b/test/scripts/tag/vimeo.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - vimeo', function(){ - var vimeo = require('../../lib/plugins/tag/vimeo'); + var vimeo = require('../../../lib/plugins/tag/vimeo'); it('id', function(){ var $ = cheerio.load(vimeo(['foo'])); diff --git a/test/tag/youtube.test.js b/test/scripts/tag/youtube.js similarity index 87% rename from test/tag/youtube.test.js rename to test/scripts/tag/youtube.js index 7a1cb9b0c6..8b3ec2b27f 100644 --- a/test/tag/youtube.test.js +++ b/test/scripts/tag/youtube.js @@ -2,7 +2,7 @@ var cheerio = require('cheerio'), should = require('chai').should(); describe('Tag - youtube', function(){ - var youtube = require('../../lib/plugins/tag/youtube'); + var youtube = require('../../../lib/plugins/tag/youtube'); it('id', function(){ var $ = cheerio.load(youtube(['foo'])); diff --git a/test/util/file2.test.js b/test/scripts/util/file2.js similarity index 99% rename from test/util/file2.test.js rename to test/scripts/util/file2.js index b427ea556a..39967fd9c8 100644 --- a/test/util/file2.test.js +++ b/test/scripts/util/file2.js @@ -3,7 +3,7 @@ var path = require('path'), async = require('async'); describe('Util - file2', function(){ - var file = require('../../lib/util/file2'); + var file = require('../../../lib/util/file2'); var uid = function(length){ var txt = '0123456789abcdefghijklmnopqrstuvwxyz', diff --git a/test/util/html_tag.test.js b/test/scripts/util/html_tag.js similarity index 92% rename from test/util/html_tag.test.js rename to test/scripts/util/html_tag.js index baf70f24f5..a77c5f563c 100644 --- a/test/util/html_tag.test.js +++ b/test/scripts/util/html_tag.js @@ -1,5 +1,5 @@ describe('Util - html_tag', function(){ - var html_tag = require('../../lib/util/html_tag'); + var html_tag = require('../../../lib/util/html_tag'); it('tag', function(){ html_tag('hr').should.eql('
'); diff --git a/test/util/yfm.test.js b/test/scripts/util/yfm.js similarity index 98% rename from test/util/yfm.test.js rename to test/scripts/util/yfm.js index 5a9e063b64..61df30a134 100644 --- a/test/util/yfm.test.js +++ b/test/scripts/util/yfm.js @@ -3,7 +3,7 @@ var yaml = require('yamljs'), should = require('chai').should(); describe('Util - yfm', function(){ - var yfm = require('../../lib/util/yfm'); + var yfm = require('../../../lib/util/yfm'); describe('parse', function(){ it('only content', function(){