Skip to content

Commit 0ba7c01

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

20 files changed

+62
-94
lines changed

test/binder/Accumulator.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
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, UndoHistoryImpl} from "../../src/interacto";
15+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1716
import {StubCmd} from "../command/StubCmd";
1817
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1918
import {robot} from "interacto-nono";
20-
import type {Bindings} from "../../src/api/binding/Bindings";
21-
import type {UndoHistoryBase} from "../../src/interacto";
19+
import type {UndoHistoryBase, Bindings} from "../../src/interacto";
2220

2321
let button1: HTMLButtonElement;
2422
let cmd: StubCmd;

test/binder/BaseBinderBuilder.test.ts

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

15-
import {isEltRef} from "../../src/api/binder/BaseBinderBuilder";
15+
import {isEltRef} from "../../src/interacto";
1616
import {describe, expect, test} from "@jest/globals";
1717

1818
describe("using a base binder builder", () => {

test/binder/BlockEventBinder.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import {StubCmd} from "../command/StubCmd";
1616
import {createKeyEvent, createMouseEvent} from "../interaction/StubEvents";
1717
import {afterEach, beforeEach, describe, expect, test} from "@jest/globals";
1818
import {mock} from "jest-mock-extended";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, UndoHistoryBase, Logger} from "../../src/interacto";
19+
import type {Binding, Bindings, UndoHistoryBase, Logger} from "../../src/interacto";
2120
import type {Subscription} from "rxjs";
2221

2322
let canvas1: HTMLElement;

test/binder/ButtonBinder.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@
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, UndoHistoryImpl} from "../../src/interacto";
15+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1716
import {StubCmd} from "../command/StubCmd";
1817
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, EltRef, Interaction, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, EltRef, Interaction, UndoHistoryBase, Bindings} from "../../src/interacto";
2119

2220
let button1: HTMLButtonElement;
2321
let button2: HTMLButtonElement;

test/binder/CheckboxBinder.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
* You should have received a copy of the GNU General Public License
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
14-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
15-
import {BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
14+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1615
import {StubCmd} from "../command/StubCmd";
1716
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1817
import {robot} from "interacto-nono";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, Interaction, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, Interaction, UndoHistoryBase, Bindings} from "../../src/interacto";
2119

2220
let widget1: HTMLInputElement;
2321
let widget2: HTMLInputElement;

test/binder/ColorPickerBinder.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
* You should have received a copy of the GNU General export function License
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
14-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
15-
import {BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
14+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1615
import {StubCmd} from "../command/StubCmd";
1716
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1817
import {robot} from "interacto-nono";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, Interaction, WidgetData, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, Interaction, WidgetData, UndoHistoryBase, Bindings} from "../../src/interacto";
2119

2220
let widget1: HTMLInputElement;
2321
let widget2: HTMLInputElement;

test/binder/ComboboxBinder.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
* You should have received a copy of the GNU General export function License
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
14-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
15-
import {BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
14+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1615
import {StubCmd} from "../command/StubCmd";
1716
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1817
import {robot} from "interacto-nono";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, Interaction, WidgetData, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, Interaction, WidgetData, UndoHistoryBase, Bindings} from "../../src/interacto";
2119

2220
let widget1: HTMLSelectElement;
2321
let widget2: HTMLSelectElement;

test/binder/DateBinder.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111
* You should have received a copy of the GNU General export function License
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
14-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
15-
import {BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
14+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1615
import {StubCmd} from "../command/StubCmd";
1716
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
1817
import {robot} from "interacto-nono";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Binding, Interaction, WidgetData, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, Interaction, WidgetData, UndoHistoryBase, Bindings} from "../../src/interacto";
2119

2220
let widget1: HTMLInputElement;
2321
let widget2: HTMLInputElement;

test/binder/KeysBinder.test.ts

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

15-
import {KeysBinder} from "../../src/impl/binder/KeysBinder";
16-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
17-
import {BindingsImpl} from "../../src/impl/binding/BindingsImpl";
18-
import {KeyDown} from "../../src/impl/interaction/library/KeyDown";
19-
import {MouseDown} from "../../src/impl/interaction/library/MouseDown";
20-
import {UndoHistoryImpl} from "../../src/impl/undo/UndoHistoryImpl";
15+
import {
16+
BindingsContext,
17+
BindingsImpl,
18+
KeysBinder,
19+
UndoHistoryImpl, KeyDown, MouseDown
20+
} from "../../src/interacto";
2121
import {StubCmd} from "../command/StubCmd";
2222
import {createKeyEvent} from "../interaction/StubEvents";
2323
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
2424
import {robot} from "interacto-nono";
2525
import {mock} from "jest-mock-extended";
26-
import type {EltRef} from "../../src/api/binder/BaseBinderBuilder";
27-
import type {KeyInteractionCmdBinder} from "../../src/api/binder/KeyInteractionCmdBinder";
28-
import type {Binding} from "../../src/api/binding/Binding";
29-
import type {Bindings} from "../../src/api/binding/Bindings";
30-
import type {BindingsObserver} from "../../src/api/binding/BindingsObserver";
31-
import type {Command} from "../../src/api/command/Command";
32-
import type {Interaction} from "../../src/api/interaction/Interaction";
33-
import type {KeyData} from "../../src/api/interaction/KeyData";
34-
import type {KeysData} from "../../src/api/interaction/KeysData";
35-
import type {Logger} from "../../src/api/logging/Logger";
36-
import type {UndoHistory} from "../../src/api/undo/UndoHistory";
37-
import type {UndoHistoryBase} from "../../src/api/undo/UndoHistoryBase";
26+
import type {
27+
Binding,
28+
Bindings, BindingsObserver,
29+
Command,
30+
Interaction,
31+
UndoHistoryBase, Logger, KeysData, EltRef, UndoHistory, KeyInteractionCmdBinder, KeyData
32+
} from "../../src/interacto";
3833

3934
let elt: HTMLElement;
4035
let binding: Binding<Command, Interaction<object>, unknown> | undefined;

test/binder/LongTouchBinder.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@
1111
* You should have received a copy of the GNU General Public License
1212
* along with Interacto. If not, see <https://www.gnu.org/licenses/>.
1313
*/
14-
import {BindingsContext} from "../../src/impl/binding/BindingsContext";
15-
import {BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
14+
import {BindingsContext, BindingsImpl, UndoHistoryImpl} from "../../src/interacto";
1615
import {StubCmd} from "../command/StubCmd";
1716
import {createTouchEvent} from "../interaction/StubEvents";
1817
import {afterEach, beforeEach, describe, expect, jest, test} from "@jest/globals";
19-
import type {Bindings} from "../../src/api/binding/Bindings";
20-
import type {Flushable} from "../../src/impl/interaction/Flushable";
21-
import type {Binding, Interaction, InteractionBase, UndoHistoryBase} from "../../src/interacto";
18+
import type {Binding, Interaction, InteractionBase, UndoHistoryBase, Bindings, Flushable} from "../../src/interacto";
2219

2320
let binding: Binding<StubCmd, Interaction<object>, unknown> | undefined;
2421
let cmd: StubCmd;

0 commit comments

Comments
 (0)