Skip to content

Commit ba8b35f

Browse files
committed
chore: improve the paths of test files
1 parent e410bde commit ba8b35f

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

packages/common/__tests__/dom.test.ts renamed to packages/common/src/__tests__/dom.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
findParentByClassName,
33
getPositionByPlacement,
44
getElementClientCenter,
5-
} from '../src/dom';
5+
} from '../dom';
66

77
describe('Test functions in dom.ts', () => {
88
test('The getPositionByPlacement function', () => {

packages/common/__tests__/eventBus.test.ts renamed to packages/common/src/__tests__/eventBus.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { GlobalEvent } from '../src/event/index';
1+
import { GlobalEvent } from '../event/index';
22

33
class Test extends GlobalEvent {}
44

packages/common/__tests__/eventEmitter.test.ts renamed to packages/common/src/__tests__/eventEmitter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { EventEmitter } from '../src/event';
1+
import { EventEmitter } from '../event';
22

33
describe('Test the EventEmitter class', () => {
44
const event = new EventEmitter();

packages/common/__tests__/treeUtil.test.ts renamed to packages/common/src/__tests__/treeUtil.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { expectLoggerErrorToBeCalled } from '../test/utils';
2-
import { TreeViewUtil } from '../src/treeUtil';
3-
import { searchById } from '../src/utils';
1+
import { expectLoggerErrorToBeCalled } from '../../test/utils';
2+
import { TreeViewUtil } from '../treeUtil';
3+
import { searchById } from '../utils';
44

55
const mockTreeData = {
66
id: 1,

packages/common/__tests__/utils.test.ts renamed to packages/common/src/__tests__/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
normalizeFlattedObject,
33
colorLightOrDark,
44
cloneInstance,
5-
} from '../src/utils';
5+
} from '../utils';
66

77
describe('Test Utils', () => {
88
test('The normalizeFlattedObject function', () => {

packages/common/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"preserveConstEnums": true,
88
"sourceMap": false,
99
"outDir": "./esm",
10-
"rootDir": "./src",
10+
"rootDir": ".",
1111
"paths": {
1212
"@test/*": ["../../test/*"]
1313
}

packages/glue/__tests__/component.test.ts renamed to packages/glue/src/__tests__/component.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from '../src';
1+
import { Component } from '../component';
22

33
class Test extends Component {
44
state = {

packages/glue/__tests__/connector.test.tsx renamed to packages/glue/src/__tests__/connector.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { fireEvent, render } from '@testing-library/react';
3-
import { Component, ComponentEvents, connect, Controller } from '../src';
3+
import { Component, ComponentEvents, connect, Controller } from '..';
44

55
class TestServiceA extends Component {
66
state = {

packages/glue/__tests__/helper.test.tsx renamed to packages/glue/src/__tests__/helper.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { fireEvent, render } from '@testing-library/react';
3-
import { cloneReactChildren } from '../src';
3+
import { cloneReactChildren } from '..';
44

55
describe('Test helper.ts', () => {
66
test('Clone the React children', () => {

0 commit comments

Comments
 (0)