Skip to content

Commit 5d84a9e

Browse files
authored
fix(core): Export TypeFactories and remove default export (#67)
1 parent a32e820 commit 5d84a9e

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ import { expect } from "./lib/expect";
33
export { expect };
44
export { expect as assert };
55
export { expect as assertThat };
6-
7-
export default expect;
6+
export {
7+
type AssertionFactory,
8+
type StaticTypeFactories,
9+
type TypeFactory,
10+
TypeFactories
11+
} from "./lib/helpers/TypeFactories";

test/index.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from "assert";
22

3-
import expect, { assert as libAssert, assertThat } from "../src";
3+
import { assert as libAssert, assertThat, expect, TypeFactories } from "../src";
44

55
describe("[Unit] index.test.ts", () => {
66
context("expect", () => {
@@ -20,4 +20,10 @@ describe("[Unit] index.test.ts", () => {
2020
assert.deepStrictEqual(assertThat, expect);
2121
});
2222
});
23+
24+
context("TypeFactories", () => {
25+
it("is exposed to the API", () => {
26+
assert.ok(TypeFactories);
27+
});
28+
});
2329
});

test/lib/ArrayAssertion.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert, { AssertionError } from "assert";
22

3-
import expect from "../../src";
3+
import { expect } from "../../src";
44
import { ArrayAssertion } from "../../src/lib/ArrayAssertion";
55
import { UnsupportedOperationError } from "../../src/lib/errors/UnsupportedOperationError";
66
import { TypeFactories } from "../../src/lib/helpers/TypeFactories";

test/lib/expect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from "assert";
22

3-
import expect from "../../src";
3+
import { expect } from "../../src";
44
import { ArrayAssertion } from "../../src/lib/ArrayAssertion";
55
import { Assertion } from "../../src/lib/Assertion";
66
import { BooleanAssertion } from "../../src/lib/BooleanAssertion";

0 commit comments

Comments
 (0)