mirror of
https://github.com/idrawjs/idraw
synced 2026-05-24 10:08:34 +00:00
test: reset all unit test
This commit is contained in:
parent
338a3b86f5
commit
addcb99c41
14 changed files with 18 additions and 18 deletions
|
|
@ -25,8 +25,8 @@ module.exports = {
|
|||
"modulePaths": [
|
||||
"<rootDir>"
|
||||
],
|
||||
// "testRegex": "(/packages/([^\/]{1,})/__tests__/.*)\\.test.ts$",
|
||||
"testRegex": "(/packages/util/__tests__/.*)\\.test.ts$",
|
||||
"testRegex": "(/packages/([^\/]{1,})/__tests__/.*)\\.test.ts$",
|
||||
// "testRegex": "(/packages/idraw/__tests__/.*)\\.test.ts$",
|
||||
"setupFiles": [
|
||||
"jest-canvas-mock"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from './../src';
|
||||
import { Board } from './../src';
|
||||
import { getData } from './data';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from '../src';
|
||||
import { Board } from '../src';
|
||||
import { getData } from './data';
|
||||
|
||||
describe('@idraw/board', () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from '../src';
|
||||
import { Board } from '../src';
|
||||
|
||||
describe('@idraw/board', () => {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from '../src';
|
||||
import { Board } from '../src';
|
||||
import { getData } from './data';
|
||||
|
||||
describe('@idraw/board', () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from '../src';
|
||||
import { Board } from '../src';
|
||||
import { getData } from './data';
|
||||
|
||||
describe('@idraw/board', () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Board from '../src';
|
||||
import { Board } from '../src';
|
||||
import { getData } from './data';
|
||||
|
||||
describe('@idraw/board', () => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { requestAnimationFrameMock } from './../../../__tests__/polyfill/requestanimateframe';
|
||||
import './../../../__tests__/polyfill/image';
|
||||
|
||||
import Core from './../src';
|
||||
import { Core } from './../src/';
|
||||
import { getData } from './data';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Core from './../../src';
|
||||
import { Core } from './../../src';
|
||||
|
||||
describe("@idraw/core static check", () => {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// import { TypeData } from '@idraw/types';
|
||||
import Core from '../../src';
|
||||
import { Core } from '../../src';
|
||||
import { getData } from '../data';
|
||||
|
||||
describe("@idraw/core: Element API", () => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import Core from './../../src';
|
||||
import { Core } from './../../src';
|
||||
|
||||
describe("@idraw/core:static is", () => {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { TypeData } from '@idraw/types';
|
||||
import Core from './../../src';
|
||||
import { Core } from './../../src';
|
||||
import { getData } from './../data';
|
||||
import { Element } from './../../src/lib/element';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import IDraw from '../../src';
|
||||
import { Core } from '../../src';
|
||||
|
||||
describe('@idraw/core', () => {
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ describe('@idraw/core', () => {
|
|||
scrollTop: 100,
|
||||
};
|
||||
const mount = document.querySelector('#mount') as HTMLDivElement;
|
||||
const idraw = new IDraw(mount, opts);
|
||||
const idraw = new Core(mount, opts);
|
||||
|
||||
idraw.scale(transform.scale);
|
||||
idraw.scrollLeft(transform.scrollLeft);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { requestAnimationFrameMock } from '../../../__tests__/polyfill/requestanimateframe';
|
||||
import '../../../__tests__/polyfill/image';
|
||||
|
||||
import IDraw from '../src';
|
||||
import { Core } from '../src';
|
||||
import { getData } from './data';
|
||||
|
||||
// function delay(time: number): Promise<void> {
|
||||
|
|
@ -30,7 +30,7 @@ describe("@idraw/core", () => {
|
|||
devicePixelRatio: 4
|
||||
}
|
||||
const mount = document.querySelector('#mount') as HTMLDivElement;
|
||||
const idraw = new IDraw(mount, opts);
|
||||
const idraw = new Core(mount, opts);
|
||||
const data = getData();
|
||||
idraw.setData(data);
|
||||
idraw.moveUpElement('image-003');
|
||||
|
|
@ -60,7 +60,7 @@ describe("@idraw/core", () => {
|
|||
devicePixelRatio: 4
|
||||
}
|
||||
const mount = document.querySelector('#mount') as HTMLDivElement;
|
||||
const idraw = new IDraw(mount, opts);
|
||||
const idraw = new Core(mount, opts);
|
||||
const data = getData();
|
||||
idraw.setData(data);
|
||||
idraw.moveDownElement('image-003');
|
||||
|
|
|
|||
Loading…
Reference in a new issue