Setup automatic qunit testing.
This commit is contained in:
parent
3650eb2af7
commit
4630f3c876
3
.travis.yml
Normal file
3
.travis.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
language: node_js
|
||||||
|
node_js:
|
||||||
|
- 0.8
|
||||||
@ -20,7 +20,7 @@
|
|||||||
// @icon https://github.com/MayhemYDG/4chan-x/raw/stable/img/icon.gif
|
// @icon https://github.com/MayhemYDG/4chan-x/raw/stable/img/icon.gif
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/* 4chan X Alpha - Version 3.0.0 - 2012-09-26
|
/* 4chan X Alpha - Version 3.0.0 - 2012-10-13
|
||||||
* http://mayhemydg.github.com/4chan-x/
|
* http://mayhemydg.github.com/4chan-x/
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
* Copyright (c) 2009-2011 James Campos <james.r.campos@gmail.com>
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
# Get 4chan X [HERE](http://mayhemydg.github.com/4chan-x/).
|
# 4chan X [](https://travis-ci.org/MayhemYDG/4chan-x)
|
||||||
|
|
||||||
|
Get it [here](http://mayhemydg.github.com/4chan-x/).
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
|
|||||||
8
grunt.js
8
grunt.js
@ -76,6 +76,13 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
clean: {
|
clean: {
|
||||||
tmp:['tmp']
|
tmp:['tmp']
|
||||||
|
},
|
||||||
|
qunit: {
|
||||||
|
all: 'http://localhost:8000/test/index.html'
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
port: 8000,
|
||||||
|
base: '.'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -88,5 +95,6 @@ module.exports = function(grunt) {
|
|||||||
grunt.registerTask('release', 'concat:meta concat:latest default exec:commit exec:push');
|
grunt.registerTask('release', 'concat:meta concat:latest default exec:commit exec:push');
|
||||||
grunt.registerTask('patch', 'bump');
|
grunt.registerTask('patch', 'bump');
|
||||||
grunt.registerTask('upgrade', 'bump:minor');
|
grunt.registerTask('upgrade', 'bump:minor');
|
||||||
|
grunt.registerTask('test', 'server qunit');
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -3,6 +3,9 @@
|
|||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"author": "Nicolas Stepien <stepien.nicolas@gmail.com>",
|
"author": "Nicolas Stepien <stepien.nicolas@gmail.com>",
|
||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
|
"scripts": {
|
||||||
|
"test": "grunt test --verbose"
|
||||||
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/MayhemYDG/4chan-x.git"
|
"url": "https://github.com/MayhemYDG/4chan-x.git"
|
||||||
@ -12,7 +15,11 @@
|
|||||||
"grunt-contrib-clean": "0.3.x",
|
"grunt-contrib-clean": "0.3.x",
|
||||||
"grunt-contrib-coffee": "0.3.x",
|
"grunt-contrib-coffee": "0.3.x",
|
||||||
"grunt-exec": "0.3.x",
|
"grunt-exec": "0.3.x",
|
||||||
"grunt-image-embed": "0.0.x"
|
"grunt-image-embed": "0.0.x",
|
||||||
|
"qunitjs": "1.x.x"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"grunt": "0.3.x"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
18
test/index.html
Normal file
18
test/index.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<title>QUnit</title>
|
||||||
|
<link rel='stylesheet' href='../node_modules/qunitjs/qunit/qunit.css'>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='qunit'></div>
|
||||||
|
<script src='../node_modules/qunitjs/qunit/qunit.js'></script>
|
||||||
|
<script>
|
||||||
|
module('test module');
|
||||||
|
test('test', function() {
|
||||||
|
ok(true, 'Passed!');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user