Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

testing-helpers

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testing-helpers - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

.circleci/config.yml

2

babel.config.js
module.exports = {
presets: ["@babel/preset-env"]
presets: ['@babel/preset-env'],
};

@@ -39,8 +39,10 @@ "use strict";

findAll = _ref2$findAll === void 0 ? false : _ref2$findAll;
var attribute = window && _lodash["default"].get(window, "process.env.VUE_APP_TITLE") ? "test-id" : "testID";
// eslint-disable-next-line no-undef
var attribute = window && _lodash["default"].get(window, 'process.env.VUE_APP_TITLE') ? 'test-id' : 'testID';
if (findAll) {
return wrapper.findAll("[".concat(attribute, "=\"").concat(testID, "\"]"));
}
} // eslint-disable-next-line lodash/prefer-lodash-method
return wrapper.find("[".concat(attribute, "=\"").concat(testID, "\"]"));

@@ -47,0 +49,0 @@ }

{
"name": "testing-helpers",
"version": "0.0.4",
"main": "build/index.js",
"repository": "https://github.com/lawnstarter/testing-helpers",
"author": "Michael Lefkowitz <lefkowitz.michael@gmail.com>",
"license": "MIT",
"scripts": {
"build": "./node_modules/.bin/babel src/index.js --out-dir build"
},
"dependencies": {
"lodash": "^4.17.15"
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3"
}
"name": "testing-helpers",
"version": "0.1.0",
"main": "build/index.js",
"repository": "https://github.com/lawnstarter/testing-helpers",
"author": "Michael Lefkowitz <lefkowitz.michael@gmail.com>",
"license": "MIT",
"scripts": {
"build": "./node_modules/.bin/babel src/index.js --out-dir build",
"cm": "git-cz",
"cm:retry": "git-cz --retry",
"prettier:debug-check": "prettier --config ./.prettierrc.js --debug-check \"{src,test}/**/*.js\"",
"preprettier:all": "yarn run prettier:debug-check",
"prettier:all": "prettier --config ./.prettierrc.js --write \"{src,test}/**/*.js\"",
"generate:licenses": "license-checker --csv --customPath ./licenses/customFormat.json --out ./licenses/licenses.csv",
"lint": "echo \"---Running ESLint---\" && eslint \"src/**/*.{js,jsx}\"",
"lint:all": "yarn run eslint --ext .js ."
},
"dependencies": {
"lodash": "^4.17.15"
},
"devDependencies": {
"@babel/cli": "^7.6.4",
"@babel/core": "^7.6.4",
"@babel/preset-env": "^7.6.3",
"@commitlint/cli": "7.5.2",
"@semantic-release/changelog": "3.0.4",
"@semantic-release/commit-analyzer": "6.1.0",
"@semantic-release/git": "7.0.8",
"@semantic-release/github": "5.2.10",
"@semantic-release/npm": "5.1.4",
"@semantic-release/release-notes-generator": "7.1.4",
"commitizen": "3.0.7",
"cz-ls-commits": "https://github.com/lawnstarter/cz-ls-commits#0.3.1",
"eslint-config-ls-react": "https://github.com/lawnstarter/eslint-config-ls-react#3.0.0",
"husky": "3.0.1",
"license-checker": "25.0.1",
"pretty-quick": "1.11.1",
"semantic-release": "15.13.18"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-push": "echo \"---Running ESLint---\" && yarn lint"
}
},
"release": {
"tagFormat": "${version}",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"build/index.js",
"CHANGELOG.md",
"package.json",
"yarn.lock"
]
}
],
"@semantic-release/github"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-ls-commits"
}
}
}

@@ -1,34 +0,34 @@

import _ from "lodash";
import _ from 'lodash';
export function setMockYCoordinates({ inputsState, orderedInputsArray }) {
const updatedInputsState = _.cloneDeep(inputsState);
let yCoordinate = 0;
_.forEach(orderedInputsArray, inputSet => {
_.forEach(inputSet, input => {
updatedInputsState[input].yCoordinate = yCoordinate;
const updatedInputsState = _.cloneDeep(inputsState);
let yCoordinate = 0;
_.forEach(orderedInputsArray, (inputSet) => {
_.forEach(inputSet, (input) => {
updatedInputsState[input].yCoordinate = yCoordinate;
});
yCoordinate += 10;
});
yCoordinate += 10;
});
return updatedInputsState;
return updatedInputsState;
}
export function findTestIDInWrapper({ wrapper, testID, findAll = false }) {
const attribute = window && _.get(window, "process.env.VUE_APP_TITLE")
? "test-id"
: "testID";
// eslint-disable-next-line no-undef
const attribute = window && _.get(window, 'process.env.VUE_APP_TITLE') ? 'test-id' : 'testID';
if (findAll) {
return wrapper.findAll(`[${attribute}="${testID}"]`);
}
return wrapper.find(`[${attribute}="${testID}"]`);
if (findAll) {
return wrapper.findAll(`[${attribute}="${testID}"]`);
}
// eslint-disable-next-line lodash/prefer-lodash-method
return wrapper.find(`[${attribute}="${testID}"]`);
}
export function flushPromises() {
return new Promise(resolve => {
return setImmediate(resolve);
});
return new Promise((resolve) => {
return setImmediate(resolve);
});
}
export function spyOnActionCreator({ actions, key }) {
return jest.spyOn(actions, key).mockReturnValue(_.constant(_.noop));
return jest.spyOn(actions, key).mockReturnValue(_.constant(_.noop));
}

Sorry, the diff of this file is not supported yet

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