Skip to content

Commit

Permalink
fix(core): Export TypeFactories and remove default export (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseLion authored Sep 6, 2022
1 parent a32e820 commit 5d84a9e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ import { expect } from "./lib/expect";
export { expect };
export { expect as assert };
export { expect as assertThat };

export default expect;
export {
type AssertionFactory,
type StaticTypeFactories,
type TypeFactory,
TypeFactories
} from "./lib/helpers/TypeFactories";
8 changes: 7 additions & 1 deletion test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from "assert";

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

describe("[Unit] index.test.ts", () => {
context("expect", () => {
Expand All @@ -20,4 +20,10 @@ describe("[Unit] index.test.ts", () => {
assert.deepStrictEqual(assertThat, expect);
});
});

context("TypeFactories", () => {
it("is exposed to the API", () => {
assert.ok(TypeFactories);
});
});
});
2 changes: 1 addition & 1 deletion test/lib/ArrayAssertion.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert, { AssertionError } from "assert";

import expect from "../../src";
import { expect } from "../../src";
import { ArrayAssertion } from "../../src/lib/ArrayAssertion";
import { UnsupportedOperationError } from "../../src/lib/errors/UnsupportedOperationError";
import { TypeFactories } from "../../src/lib/helpers/TypeFactories";
Expand Down
2 changes: 1 addition & 1 deletion test/lib/expect.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from "assert";

import expect from "../../src";
import { expect } from "../../src";
import { ArrayAssertion } from "../../src/lib/ArrayAssertion";
import { Assertion } from "../../src/lib/Assertion";
import { BooleanAssertion } from "../../src/lib/BooleanAssertion";
Expand Down

0 comments on commit 5d84a9e

Please sign in to comment.