New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dom-testing-library

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-testing-library - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

11

dist/events.js

@@ -343,3 +343,4 @@ 'use strict';

var value = _eventInit$target.value,
targetProperties = _objectWithoutProperties(_eventInit$target, ['value']);
files = _eventInit$target.files,
targetProperties = _objectWithoutProperties(_eventInit$target, ['value', 'files']);

@@ -350,2 +351,10 @@ Object.assign(node, targetProperties);

}
if (files !== undefined) {
// input.files is a read-only property so this is not allowed:
// input.files = [file]
// so we have to use this workaround to set the property
Object.defineProperty(node, 'files', {
value: files
});
}
var event = new EventType(eventName, eventInit);

@@ -352,0 +361,0 @@ return fireEvent(node, event);

2

package.json
{
"name": "dom-testing-library",
"version": "3.3.0",
"version": "3.4.0",
"description": "Simple and complete DOM testing utilities that encourage good testing practices.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -528,2 +528,11 @@ <div align="center">

fireEvent.change(getByLabelText(/username/i), {target: {value: 'a'}})
// note: attempting to manually set the files property of an HTMLInputElement
// results in an error as the files property is read-only.
// this feature works around that by using Object.defineProperty.
fireEvent.change(getByLabelText(/picture/i), {
target: {
files: [new File(['(⌐□_□)'], 'chucknorris.png', {type: 'image/png'})],
},
})
```

@@ -558,3 +567,3 @@

make it easier to check several aspects of the state of a DOM element. For
exmaple, you can use the ones provided by
example, you can use the ones provided by
[jest-dom](https://github.com/gnapse/jest-dom):

@@ -561,0 +570,0 @@

Sorry, the diff of this file is too big to display

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