test: reset all unit test

This commit is contained in:
chenshenhai 2022-04-29 22:01:08 +08:00
parent 338a3b86f5
commit addcb99c41
14 changed files with 18 additions and 18 deletions

View file

@ -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"
]

View file

@ -1,4 +1,4 @@
import Board from './../src';
import { Board } from './../src';
import { getData } from './data';

View file

@ -1,4 +1,4 @@
import Board from '../src';
import { Board } from '../src';
import { getData } from './data';
describe('@idraw/board', () => {

View file

@ -1,4 +1,4 @@
import Board from '../src';
import { Board } from '../src';
describe('@idraw/board', () => {

View file

@ -1,4 +1,4 @@
import Board from '../src';
import { Board } from '../src';
import { getData } from './data';
describe('@idraw/board', () => {

View file

@ -1,4 +1,4 @@
import Board from '../src';
import { Board } from '../src';
import { getData } from './data';
describe('@idraw/board', () => {

View file

@ -1,4 +1,4 @@
import Board from '../src';
import { Board } from '../src';
import { getData } from './data';
describe('@idraw/board', () => {

View file

@ -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';

View file

@ -1,4 +1,4 @@
import Core from './../../src';
import { Core } from './../../src';
describe("@idraw/core static check", () => {

View file

@ -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", () => {

View file

@ -1,4 +1,4 @@
import Core from './../../src';
import { Core } from './../../src';
describe("@idraw/core:static is", () => {

View file

@ -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';

View file

@ -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);

View file

@ -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');