Skip to content

Commit

Permalink
fix path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankll committed Jul 11, 2023
1 parent 53e5295 commit 6870acd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@geek-fun/jest-search",
"version": "0.0.4",
"version": "0.0.5",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"description": "Jest preset for running tests with local search platform",
Expand Down
2 changes: 1 addition & 1 deletion src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const startEngine = async ({
engine = EngineType.ELASTICSEARCH,
version = '8.8.2',
port = 9200,
binaryLocation = path.resolve(__dirname + '/../') + '/node_modules/.cache/jest-search',
binaryLocation = path.resolve(process.cwd() + '/node_modules/.cache/jest-search'),
clusterName = 'jest-search-local',
nodeName = 'jest-search-local',
indexes = [],
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';

const globalSetup = async () => {
const configPath =
process.env.JEST_ELASTICSEARCH_CONFIG || path.resolve(__dirname + '/../jest-search-config.js');
process.env.JEST_SEARCH_CONFIG || path.resolve(process.cwd() + '/jest-search-config.js');
const config = (await import(configPath))();
await startEngine(config);
};
Expand Down

0 comments on commit 6870acd

Please sign in to comment.