Skip to content

Commit

Permalink
Set getIndices as static function
Browse files Browse the repository at this point in the history
  • Loading branch information
jbdemonte committed May 14, 2018
1 parent 01669f2 commit 293921d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [1.2.1] 2018-05-14

- Fix missing `static` on Core.getIndices

## [1.2.0] 2018-05-14

- Added index stored + getIndices to retrieve all indexed classes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gojob/ts-elasticsearch",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"description": "Elasticsearch decorated by TypeScript",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ describe('getIndices', () => {
const spy = jest.spyOn(IndexStore, 'getAll');
spy.mockReturnValue(indices);

expect(core.getIndices()).toBe(indices);
expect(Core.getIndices()).toBe(indices);
expect(spy).toHaveBeenCalledTimes(1);

spy.mockRestore();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class Core {
/**
* Return all Indexed classes
*/
getIndices(): AnyClass[] {
static getIndices(): AnyClass[] {
return IndexStore.getAll();
}

Expand Down

0 comments on commit 293921d

Please sign in to comment.