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

react-select-event

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-select-event - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

18

lib/react-select-event.cjs.js

@@ -5,3 +5,3 @@ 'use strict';

var domTestingLibrary = require('dom-testing-library');
var dom = require('@testing-library/dom');

@@ -16,4 +16,4 @@ /** Simulate user events on react-select dropdowns */

const focus = input => {
domTestingLibrary.fireEvent.focus(input);
domTestingLibrary.fireEvent.keyDown(input, {
dom.fireEvent.focus(input);
dom.fireEvent.keyDown(input, {
key: "ArrowDown",

@@ -27,3 +27,3 @@ keyCode: 40,

const type = (input, text) => {
domTestingLibrary.fireEvent.change(input, {
dom.fireEvent.change(input, {
target: {

@@ -47,4 +47,4 @@ value: text

focus(input);
await domTestingLibrary.findByText(container, option);
domTestingLibrary.fireEvent.click(domTestingLibrary.getByText(container, option));
await dom.findByText(container, option);
dom.fireEvent.click(dom.getByText(container, option));
}

@@ -62,3 +62,3 @@ };

domTestingLibrary.fireEvent.keyDown(input, {
dom.fireEvent.keyDown(input, {
key: "Enter",

@@ -77,3 +77,3 @@ keyCode: 13,

domTestingLibrary.fireEvent.click(container.querySelector('svg[aria-hidden="true"]'));
dom.fireEvent.click(container.querySelector('svg[aria-hidden="true"]'));
};

@@ -91,3 +91,3 @@ /**

const element = elements[elements.length - 2];
domTestingLibrary.fireEvent.mouseDown(element);
dom.fireEvent.mouseDown(element);
};

@@ -94,0 +94,0 @@ var index = {

@@ -1,2 +0,2 @@

import { findByText, fireEvent, getByText } from 'dom-testing-library';
import { findByText, fireEvent, getByText } from '@testing-library/dom';

@@ -3,0 +3,0 @@ /** Simulate user events on react-select dropdowns */

{
"name": "react-select-event",
"version": "1.0.0",
"version": "2.0.0",
"description": "Simulate react-select events for react-testing-library",

@@ -39,3 +39,3 @@ "main": "lib/react-select-event.cjs.js",

"dependencies": {
"dom-testing-library": "^4.1.1"
"@testing-library/dom": "^5.5.2"
},

@@ -49,2 +49,4 @@ "devDependencies": {

"@babel/preset-typescript": "^7.3.3",
"@testing-library/jest-dom": "^4.0.0",
"@testing-library/react": "^8.0.4",
"@types/jest": "^24.0.13",

@@ -54,3 +56,2 @@ "@types/react": "^16.8.19",

"jest": "^24.8.0",
"jest-dom": "^3.4.0",
"prettier": "^1.17.1",

@@ -60,3 +61,2 @@ "react": "^16.8.6",

"react-select": "^2.4.3",
"react-testing-library": "^7.0.1",
"rimraf": "^2.6.3",

@@ -63,0 +63,0 @@ "rollup": "^1.12.4",

/** Simulate user events on react-select dropdowns */
import { fireEvent, findByText, getByText } from "dom-testing-library";
import { fireEvent, findByText, getByText } from "@testing-library/dom";

@@ -5,0 +5,0 @@ // find the react-select container from its input field 🤷

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