Fix broken tests

This commit is contained in:
Paulo Gustavo Veiga 2021-12-14 09:58:47 -08:00
parent e8fc5d4977
commit 516ac88b30
6 changed files with 6 additions and 12 deletions

View File

@ -18,7 +18,7 @@
import * as web2d from '@wisemapping/web2d'; import * as web2d from '@wisemapping/web2d';
import { $assert, $defined } from '@wisemapping/core-js'; import { $assert, $defined } from '@wisemapping/core-js';
import { TopicShape } from '../model/INodeModel'; import { TopicShape } from '../model/INodeModel';
import TopicConfig from '../TopicConfig'; import { CONNECTOR_WIDTH } from '../TopicConfig';
const Shape = { const Shape = {
isAtRight(sourcePoint, targetPoint) { isAtRight(sourcePoint, targetPoint) {
@ -124,7 +124,7 @@ const Shape = {
} }
// Move a little the position... // Move a little the position...
const offset = TopicConfig.CONNECTOR_WIDTH / 2; const offset = CONNECTOR_WIDTH / 2;
if (!isAtRight) { if (!isAtRight) {
result.x += offset; result.x += offset;
} else { } else {

View File

@ -1,4 +1,3 @@
import '../../../../libraries/mootools-core-1.4.5';
import TestSuite from './TestSuite'; import TestSuite from './TestSuite';
import LayoutManager from '../../src/components/layout/LayoutManager'; import LayoutManager from '../../src/components/layout/LayoutManager';

View File

@ -1,5 +1,4 @@
import $ from 'jquery'; import $ from 'jquery';
import '../../../../libraries/mootools-core-1.4.5';
import { Designer, LocalStorageManager } from '../../src'; import { Designer, LocalStorageManager } from '../../src';
// FIXME: The tests Map could not be loaded. // FIXME: The tests Map could not be loaded.

View File

@ -1,18 +1,16 @@
import '../../../../libraries/mootools-core-1.4.5';
import Events from '../../src/components/Events'; import Events from '../../src/components/Events';
describe('Events class suite', () => { describe('Events class suite', () => {
const TestClass = new Class({ class TestClass extends Events {
Extends: Events,
getEvents() { getEvents() {
return this.$events; return this.$events;
}, }
removeEvents() { removeEvents() {
this.$events = {}; this.$events = {};
}, }
}); }
const expectedChangeFn1 = () => 'change1'; const expectedChangeFn1 = () => 'change1';
const expectedChangeFn2 = () => 'change2'; const expectedChangeFn2 = () => 'change2';

View File

@ -1,4 +1,3 @@
import '../../../../libraries/mootools-core-1.4.5';
import TestSuite from './TestSuite'; import TestSuite from './TestSuite';
import LayoutManager from '../../src/components/layout/LayoutManager'; import LayoutManager from '../../src/components/layout/LayoutManager';

View File

@ -1,4 +1,3 @@
import '../../../../libraries/mootools-core-1.4.5';
import TestSuite from './TestSuite'; import TestSuite from './TestSuite';
import LayoutManager from '../../src/components/layout/LayoutManager'; import LayoutManager from '../../src/components/layout/LayoutManager';