Created
October 18, 2017 14:55
-
-
Save robertleeplummerjr/a7e196a828f384e54c2cfb2adf7f9d8d to your computer and use it in GitHub Desktop.
Inversify Example
This file contains hidden or 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 will come in handy | |
| import { AxiosStatic } from "axios"; | |
| import { Container } from "inversify"; | |
| import Request from "../request"; | |
| class AxiosCoreMock implements AxiosCore {} | |
| const container = new Container(); | |
| container.bind(Request).toSelf(); | |
| container.bind<AxiosCore>("axios").toConstantValue(new AxiosCoreMock()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment