mirror of
https://github.com/konvajs/konva.git
synced 2025-10-14 20:04:52 +08:00
changed lint to hint in grunt file, and removed KineticEvents-test as it is not a functional test
This commit is contained in:
@@ -58,7 +58,7 @@ module.exports = function(grunt) {
|
||||
];
|
||||
|
||||
// Project configuration.
|
||||
var lintConf = grunt.file.readJSON('.jshintrc');
|
||||
var hintConf = grunt.file.readJSON('.jshintrc');
|
||||
var config = {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
concat: {
|
||||
@@ -181,7 +181,7 @@ module.exports = function(grunt) {
|
||||
build: ['dist/*']
|
||||
},
|
||||
jshint: {
|
||||
options: lintConf,
|
||||
options: hintConf,
|
||||
all: ['src/**/*.js']
|
||||
},
|
||||
copy: {
|
||||
@@ -252,7 +252,7 @@ module.exports = function(grunt) {
|
||||
'shell:jsdoc',
|
||||
]);
|
||||
|
||||
grunt.registerTask('lint', 'Check lint errors', ['jshint']);
|
||||
grunt.registerTask('hint', 'Check hint errors', ['jshint']);
|
||||
grunt.registerTask('test', 'Run tests', ['dev', 'mocha_phantomjs']);
|
||||
|
||||
grunt.registerTask('server', 'run local server and create dev version', function() {
|
||||
|
@@ -1,34 +0,0 @@
|
||||
suite('KineticEvents', function() {
|
||||
|
||||
// ======================================================
|
||||
test('draw events', function() {
|
||||
var stage = addStage();
|
||||
var layer = new Kinetic.Layer();
|
||||
|
||||
var circle = new Kinetic.Circle({
|
||||
x: stage.getWidth() / 2,
|
||||
y: stage.getHeight() / 2,
|
||||
radius: 70,
|
||||
fill: 'red'
|
||||
});
|
||||
|
||||
var events = [];
|
||||
|
||||
layer.on('draw', function(evt) {
|
||||
events.push('layer-draw');
|
||||
});
|
||||
|
||||
layer.on('beforeDraw', function(evt) {
|
||||
events.push('layer-beforeDraw');
|
||||
});
|
||||
|
||||
layer.add(circle);
|
||||
stage.add(layer);
|
||||
|
||||
//console.log(events.toString())
|
||||
|
||||
assert.equal(events.toString(), 'layer-beforeDraw,layer-draw', 'draw event order is incorrect');
|
||||
|
||||
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user