forked from NagRock/ts-mockito
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2caf53
commit e5a6a02
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import mockitoDefault from "../src/ts-mockito"; | ||
import {spy} from "../src/ts-mockito"; | ||
import * as asteriskStyleImport from "../src/ts-mockito"; | ||
|
||
describe("default export", () => { | ||
it("is an object", () => { | ||
expect(mockitoDefault).toBeDefined(); | ||
expect(typeof mockitoDefault === "object").toBeTruthy(); | ||
expect(mockitoDefault).toBe(asteriskStyleImport.default); | ||
}); | ||
|
||
it("contains proper member functions", () => { | ||
expect(typeof mockitoDefault.spy === "function").toBeTruthy(); | ||
expect(mockitoDefault.spy).toBe(spy); | ||
}); | ||
|
||
it("contains each module member function", () => { | ||
// Asterisk style import contains all member function + the default, so default export should have one | ||
// member less. | ||
expect(Object.keys(mockitoDefault).length).toBe(Object.keys(asteriskStyleImport).length - 1); | ||
}); | ||
}); |