diff --git a/protractor-http-mock/protractor-http-mock-tests.ts b/protractor-http-mock/protractor-http-mock-tests.ts index 9fdf0695a..6c39f1401 100644 --- a/protractor-http-mock/protractor-http-mock-tests.ts +++ b/protractor-http-mock/protractor-http-mock-tests.ts @@ -9,7 +9,8 @@ function TestConfig() { function TestCtorOverloads() { let noParam: mock.ProtractorHttpMock = mock(); - let emptyArray: mock.ProtractorHttpMock = mock([]); + let emptyArray: mock.ProtractorHttpMock = mock([]); + let mockFiles: mock.ProtractorHttpMock = mock(['mock1', 'mock2']); let skipDefaults: mock.ProtractorHttpMock = mock([], true); let del: mock.requests.Delete = { diff --git a/protractor-http-mock/protractor-http-mock.d.ts b/protractor-http-mock/protractor-http-mock.d.ts index 446c7b3e9..41c4ef41f 100644 --- a/protractor-http-mock/protractor-http-mock.d.ts +++ b/protractor-http-mock/protractor-http-mock.d.ts @@ -9,15 +9,22 @@ declare module mock { interface ProtractorHttpMock { /** * Instantiate mock module. This must be done before the browser connects. - * + * * @param mocks An array of mock modules to load into the application. * @param skipDefaults Set true to skip loading of default mocks. */ (mocks?: Array>, skipDefaults?: boolean): ProtractorHttpMock; + /** + * Instantiate mock modules from files. This must be done before the browser connects. + * + * @param mocks An array of mock module names relative to the rootDirectory configuration. + */ + (mocks: Array): ProtractorHttpMock; + /** * Clean up. - * Typically done in the afterEach call to ensure the teardown + * Typically done in the afterEach call to ensure the teardown * is executed regardless of what happens in the test execution. */ teardown(): void; @@ -35,7 +42,7 @@ declare module mock { clearRequests(): webdriver.promise.Promise; /** - * Module configuration to setup + * Module configuration to setup */ config: { /** @@ -51,7 +58,7 @@ declare module mock { protractorConfig?: string; }; } - + /** * Matched request. */