Browse Source

Add Commands test

pull/36/head
Artur Arseniev 10 years ago
parent
commit
c8566507b4
  1. 4
      src/commands/main.js
  2. 1
      test/runner/main.js
  3. 30
      test/specs/commands/main.js

4
src/commands/main.js

@ -88,7 +88,9 @@ define(function(require) {
defaultCommands['open-layers'] = require('./view/OpenLayers');
defaultCommands['open-sm'] = require('./view/OpenStyleManager');
//this.defaultCommands['resize-comp'] = require('./view/ResizeComponent');
config.model = config.em.get('Canvas');
if(config.em)
config.model = config.em.get('Canvas');
return {

1
test/runner/main.js

@ -16,6 +16,7 @@ require(['../src/config/require-config.js', 'config/config.js'], function() {
'specs/css_composer/main.js',
'specs/code_manager/main.js',
'specs/panels/main.js',
'specs/commands/main.js',
], function(chai)
{
var should = chai.should(),

30
test/specs/commands/main.js

@ -0,0 +1,30 @@
var modulePath = './../../../test/specs/commands';
define([
'Commands'],
function(
Commands
) {
describe('Commands', function() {
describe('Main', function() {
var obj;
beforeEach(function () {
obj = new Commands();
});
afterEach(function () {
delete obj;
});
it('Object exists', function() {
obj.should.be.exist;
});
});
});
});
Loading…
Cancel
Save