Skip to content

Commit 614c517

Browse files
committed
refactor(test): use the barrel
1 parent 0ba7c01 commit 614c517

12 files changed

+29
-32
lines changed

test/command/AnonCmd.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16-
import {AnonCmd} from "../../src/impl/command/AnonCmd";
16+
import {AnonCmd} from "../../src/interacto";
1717
import {describe, expect, jest, test} from "@jest/globals";
1818

1919
describe("using an anon command", () => {

test/command/Command.test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable unicorn/empty-brace-spaces */
21
/*
32
* This file is part of Interacto.
43
* Interacto is free software: you can redistribute it and/or modify
@@ -12,8 +11,9 @@
1211
* You should have received a copy of the GNU General Public License
1312
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1413
*/
14+
1515
import {StubCmd} from "./StubCmd";
16-
import {CommandBase} from "../../src/impl/command/CommandBase";
16+
import {CommandBase} from "../../src/interacto";
1717
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1818

1919
describe("using a command", () => {
@@ -30,8 +30,7 @@ describe("using a command", () => {
3030

3131
test("cando default", () => {
3232
const command = new class extends CommandBase {
33-
protected execution(): void {
34-
}
33+
protected execution(): void {}
3534
}();
3635

3736
expect(command.canExecute()).toBeTruthy();

test/command/CommandAsync.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
1414

15-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
16-
import {BindingsImpl} from "../../src/impl/binding/BindingsImpl";
17-
import {CommandBase} from "../../src/impl/command/CommandBase";
18-
import {UndoHistoryImpl} from "../../src/impl/undo/UndoHistoryImpl";
15+
import {
16+
BindingsContext,
17+
BindingsImpl,
18+
CommandBase,
19+
UndoHistoryImpl
20+
} from "../../src/interacto";
1921
import {robot} from "../interaction/StubEvents";
2022
import {flushPromises} from "../Utils";
2123
import {afterEach, beforeEach, describe, expect, test, jest} from "@jest/globals";
2224
import {Subject} from "rxjs";
23-
import type {Binding} from "../../src/api/binding/Binding";
24-
import type {Bindings} from "../../src/api/binding/Bindings";
25-
import type {Interaction} from "../../src/api/interaction/Interaction";
26-
import type {UndoHistoryBase} from "../../src/api/undo/UndoHistoryBase";
27-
import type {BindingImpl} from "../../src/impl/binding/BindingImpl";
25+
import type {Binding,
26+
BindingImpl,
27+
Bindings,
28+
Interaction,
29+
UndoHistoryBase} from "../../src/interacto";
2830

2931
class Model {
3032
public data: Array<string> = ["Foo", "Bar", "Yo"];

test/command/StubCmd.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
1414

15-
import {CommandBase} from "../../src/impl/command/CommandBase";
16-
import type {Undoable} from "../../src/api/undo/Undoable";
15+
import {CommandBase} from "../../src/interacto";
16+
import type {Undoable} from "../../src/interacto";
1717

1818
export class StubCmd extends CommandBase {
1919
public candoValue: boolean;

test/command/UndoableCommand.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16-
import {UndoableCommand} from "../../src/impl/command/UndoableCommand";
16+
import {UndoableCommand} from "../../src/interacto";
1717
import {beforeEach, describe, expect, test} from "@jest/globals";
1818

1919
let cmd: UndoableCommand;

test/command/library/Redo.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
1414

15-
import {Redo} from "../../../src/impl/command/library/Redo";
15+
import {Redo} from "../../../src/interacto";
1616
import {beforeEach, describe, expect, test} from "@jest/globals";
1717
import {mock} from "jest-mock-extended";
18-
import type {Undoable} from "../../../src/api/undo/Undoable";
19-
import type {UndoHistory} from "../../../src/api/undo/UndoHistory";
18+
import type {Undoable, UndoHistory} from "../../../src/interacto";
2019
import type {MockProxy} from "jest-mock-extended";
2120

2221
let cmd: Redo;

test/command/library/RedoNTimes.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
1414

15-
import {RedoNTimes} from "../../../src/impl/command/library/RedoNTimes";
15+
import {RedoNTimes} from "../../../src/interacto";
1616
import {beforeEach, describe, expect, test} from "@jest/globals";
1717
import {mock} from "jest-mock-extended";
18-
import type {Undoable} from "../../../src/api/undo/Undoable";
19-
import type {UndoHistory} from "../../../src/api/undo/UndoHistory";
18+
import type {Undoable, UndoHistory} from "../../../src/interacto";
2019
import type {MockProxy} from "jest-mock-extended";
2120

2221
let cmd: RedoNTimes;

test/command/library/SetProperties.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16-
import {SetProperties} from "../../../src/impl/command/library/SetProperties";
16+
import {SetProperties} from "../../../src/interacto";
1717
import {beforeEach, describe, expect, test} from "@jest/globals";
1818

1919
class SecondStubSetProp {

test/command/library/SetProperty.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16-
import {SetProperty} from "../../../src/impl/command/library/SetProperty";
16+
import {SetProperty} from "../../../src/interacto";
1717
import {beforeEach, describe, expect, test} from "@jest/globals";
1818

1919
class SecondStubSetProp {

test/command/library/TransferArrayItem.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1414
*/
1515

16-
import {TransferArrayItem} from "../../../src/impl/command/library/TransferArrayItem";
16+
import {TransferArrayItem} from "../../../src/interacto";
1717
import {beforeEach, describe, expect, test} from "@jest/globals";
1818

1919
describe("using a transfer array item command", () => {

0 commit comments

Comments
 (0)