Socket
Socket
Sign inDemoInstall

@shelf/jest-elasticsearch

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shelf/jest-elasticsearch - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "@shelf/jest-elasticsearch",
"version": "0.0.3",
"version": "0.0.4",
"description": "Run your tests using jest & elasticsearch-local",

@@ -5,0 +5,0 @@ "keywords": [

@@ -25,25 +25,27 @@ # jest-elasticsearch

```js
module.exports = {
esVersion: '7.5.0',
clusterName: 'your-cluster-name',
nodeName: 'your-node-name',
port: 9200,
indexes: [
{
name: 'your-index-name',
body: {
settings: {
number_of_shards: '1',
number_of_replicas: '1'
},
aliases: {
'your-alias': {}
},
mappings: {
dynamic: false,
properties: {
//here you should paste your mapping
//Example:
id: {
type: "keyword"
module.exports = () => {
return {
esVersion: '7.5.0', // <== must be < 7.5.0
clusterName: 'your-cluster-name',
nodeName: 'your-node-name',
port: 9200,
indexes: [
{
name: 'your-index-name',
body: {
settings: {
number_of_shards: '1',
number_of_replicas: '1'
},
aliases: {
'your-alias': {}
},
mappings: {
dynamic: false,
properties: {
//here you should paste your mapping
//Example:
id: {
type: "keyword"
}
}

@@ -53,5 +55,5 @@ }

}
}
]
};
]
}
}
```

@@ -58,0 +60,0 @@

const {resolve} = require('path');
const cwd = require('cwd');
const {start} = require('@shelf/elasticsearch-local');
const getClusterSetting = require('./jest-es-config');
module.exports = async function startES() {
const userConfig = require(resolve(cwd(), 'jest-es-config.js'));
const config = require(resolve(cwd(), 'jest-es-config.js'))();
if (typeof userConfig === 'object') {
return start(userConfig);
}
return start(getClusterSetting());
return start(config);
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc