mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Merge pull request #102 from juliandescottes/add-integration-tests
Add integration tests
This commit is contained in:
commit
a3f8e29c7b
6
.jshintrc
Normal file
6
.jshintrc
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"evil": true,
|
||||
"asi": true,
|
||||
"smarttabs": true,
|
||||
"eqnull": true
|
||||
}
|
16
.travis.yml
16
.travis.yml
@ -1,3 +1,13 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.6
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
before_install:
|
||||
- npm install -g grunt-cli
|
||||
- git clone git://github.com/n1k0/casperjs.git ~/casperjs
|
||||
- cd ~/casperjs
|
||||
- git checkout tags/1.0.2
|
||||
- export PATH=$PATH:`pwd`/bin
|
||||
- cd -
|
||||
before_script:
|
||||
- phantomjs --version
|
||||
- casperjs --version
|
||||
|
46
Gruntfile.js
Normal file
46
Gruntfile.js
Normal file
@ -0,0 +1,46 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
files: [
|
||||
'Gruntfile.js',
|
||||
'package.json',
|
||||
// TODO(grosbouddha): change to js/**/*.js and fix the 10K jshint
|
||||
// error messages or fine-tune .jshintrc file.
|
||||
'js/*.js'
|
||||
]
|
||||
},
|
||||
connect: {
|
||||
www: {
|
||||
options: {
|
||||
base: '.',
|
||||
port: 4545
|
||||
}
|
||||
}
|
||||
},
|
||||
ghost: {
|
||||
dist: {
|
||||
filesSrc: ['tests/integration/casperjs/*_test.js'],
|
||||
options: {
|
||||
args: {
|
||||
baseUrl: 'http://localhost:' +
|
||||
'<%= connect.www.options.port %>/'
|
||||
},
|
||||
direct: false,
|
||||
logLevel: 'error',
|
||||
printCommand: false,
|
||||
printFilePaths: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-ghost');
|
||||
|
||||
grunt.registerTask('test', ['jshint', 'connect', 'ghost']);
|
||||
|
||||
};
|
BIN
mongoose-3.7.exe
Normal file
BIN
mongoose-3.7.exe
Normal file
Binary file not shown.
33
package.json
33
package.json
@ -1,15 +1,20 @@
|
||||
{
|
||||
"author": "People",
|
||||
"name": "piskel",
|
||||
"description": "Web based 2d animations editor",
|
||||
"version": "0.0.1",
|
||||
"homepage": "http://github.com/juliandescottes/piskel",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/juliandescottes/piskel.git"
|
||||
},
|
||||
"scripts": { "test": "make test" },
|
||||
"devDependencies": {
|
||||
"jshint": "0.6.1"
|
||||
}
|
||||
{
|
||||
"author": "People",
|
||||
"name": "piskel",
|
||||
"description": "Web based 2d animations editor",
|
||||
"version": "0.0.1",
|
||||
"homepage": "http://github.com/juliandescottes/piskel",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/juliandescottes/piskel.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.1",
|
||||
"grunt-contrib-connect": "0.3.0",
|
||||
"grunt-contrib-jshint": "0.5.4",
|
||||
"grunt-ghost": "1.0.12"
|
||||
}
|
||||
}
|
8
tests/integration/casperjs/smoke_test.js
Normal file
8
tests/integration/casperjs/smoke_test.js
Normal file
@ -0,0 +1,8 @@
|
||||
casper
|
||||
.start(casper.cli.get('baseUrl'))
|
||||
.then(function () {
|
||||
this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created');
|
||||
})
|
||||
.run(function () {
|
||||
this.test.done();
|
||||
});
|
Loading…
Reference in New Issue
Block a user