Skip to content

Commit

Permalink
refactor(module division): modules divisions
Browse files Browse the repository at this point in the history
BREAKING CHANGE: extensions (On, method) are in a separate modules,
mockFactory changed interface, name (Provider) and module

Importing On, method changed:

Before:
import { On, method } from "ts-auto-mock";

After:
import { On, method } from "ts-auto-mock/extension";

MockFactory changed name, module and interface:

Before:
import { MockFactory } from "ts-auto-mock";

MockFactory.instance.registerFactory((name: string, value: any) => {
    ...
});

After:
import { Provider } from "ts-auto-mock/extension";

Provider.instance.provideMethod((name: string, value: any) => {
    ...
});
  • Loading branch information
uittorio committed Apr 27, 2019
1 parent ad23032 commit 54575a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/framework/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { createMock } from 'ts-auto-mock';
import { method, On } from 'ts-auto-mock/extension';

describe('functions', () => {
type a = () => void;
let mock: a;
type a = () => void;

beforeEach(() => {
mock = createMock<a>();
Expand Down

0 comments on commit 54575a7

Please sign in to comment.