This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
-
-
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
priestine
committed
Mar 24, 2020
1 parent
cd0da8b
commit 5d92153
Showing
2 changed files
with
23 additions
and
2 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
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 { Intermediate } from "../src"; | ||
|
||
describe("Intermediate", (): void => { | ||
it("should return an Intermediate", (): void => { | ||
expect(Intermediate.of(123)).toBeInstanceOf(Intermediate); | ||
}); | ||
|
||
it("should wrap given value into IntermediateInterface", (): void => { | ||
expect(Intermediate.of(123).intermediate).toEqual(123); | ||
}); | ||
}); | ||
|
||
describe("Intermediate.isIntermediate", (): void => { | ||
it("should return true if argument is intermediate", (): void => { | ||
expect(Intermediate.isIntermediate({ intermediate: 123 })).toEqual(true); | ||
}); | ||
|
||
it("should return false if provided argument is not intermediate", (): void => { | ||
expect(Intermediate.isIntermediate(123)).toEqual(false); | ||
expect(Intermediate.isIntermediate({ key: 123 })).toEqual(false); | ||
}); | ||
}); |