Skip to content

Commit 15a08ac

Browse files
authored
Merge pull request #94 from appbaseio/feat/endpoint-property-support
fix: failing test-cases
2 parents 418c6c7 + 092f630 commit 15a08ac

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: __tests__/AppBaseClientTest.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ describe("#AppBase_Client", () => {
2424
});
2525
expect(true).toBe(false);
2626
} catch (e) {
27-
expect(e.message).toEqual("URL not present in options.");
27+
expect(e.message).toEqual(
28+
"url is required when using the elasticsearch Search backend."
29+
);
2830
}
2931
});
3032
test("should throw app missing error", () => {
@@ -35,7 +37,9 @@ describe("#AppBase_Client", () => {
3537
});
3638
expect(true).toBe(false);
3739
} catch (e) {
38-
expect(e.message).toEqual("App name is not present in options.");
40+
expect(e.message).toEqual(
41+
"app is required when using the elasticsearch Search backend."
42+
);
3943
}
4044
});
4145
test("should throw protocol missing error", () => {

Diff for: src/core/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function AppBase(config) {
2525
host = '',
2626
path = '',
2727
protocol = '',
28-
} = URL((config.endpoint ? config.endpoint.url : '') || config.url);
28+
} = URL((config.endpoint ? config.endpoint.url : config.url) || '');
2929
let { url } = config;
3030
url = host + path;
3131
// Parse url

0 commit comments

Comments
 (0)