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

@testing-library/dom

Package Overview
Dependencies
Maintainers
10
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@testing-library/dom - npm Package Compare versions

Comparing version 5.5.1 to 5.5.2

16

dist/__tests__/role-helpers.js

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

import jestSerializerAnsi from 'jest-serializer-ansi'
import {getRoles, logRoles, getImplicitAriaRoles} from '../role-helpers'

@@ -135,9 +134,14 @@ import {render, cleanup} from './helpers/test-utils'

test('logRoles logs expected roles for various dom nodes', () => {
expect.addSnapshotSerializer(jestSerializerAnsi)
test('logRoles calls console.log with output from prettyRoles', () => {
const {section} = setup()
const output = logRoles(section)
expect(output).toMatchSnapshot()
jest.spyOn(console, 'log').mockImplementationOnce(() => {})
logRoles(section)
// eslint-disable-next-line no-console
expect(console.log).toHaveBeenCalledTimes(1)
// eslint-disable-next-line no-console
expect(console.log.mock.calls[0][0]).toMatchSnapshot()
// eslint-disable-next-line no-console
console.log.mockRestore()
})

@@ -144,0 +148,0 @@

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

var roles = getRoles(container);
return Object.entries(roles).map(function (_ref10) {
var rolesStr = Object.entries(roles).map(function (_ref10) {
var role = _ref10[0],

@@ -789,3 +789,5 @@ elements = _ref10[1];

return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
}).join('\n');
}).join('\n'); // eslint-disable-next-line no-console
console.log(rolesStr);
}

@@ -792,0 +794,0 @@

@@ -774,3 +774,3 @@ import _extends from '@babel/runtime/helpers/esm/extends';

var roles = getRoles(container);
return Object.entries(roles).map(function (_ref10) {
var rolesStr = Object.entries(roles).map(function (_ref10) {
var role = _ref10[0],

@@ -783,3 +783,5 @@ elements = _ref10[1];

return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
}).join('\n');
}).join('\n'); // eslint-disable-next-line no-console
console.log(rolesStr);
}

@@ -786,0 +788,0 @@

@@ -88,7 +88,9 @@ "use strict";

const roles = getRoles(container);
return Object.entries(roles).map(([role, elements]) => {
const rolesStr = Object.entries(roles).map(([role, elements]) => {
const delimiterBar = '-'.repeat(50);
const elementsString = elements.map(el => (0, _queryHelpers.debugDOM)(el.cloneNode(false))).join('\n\n');
return `${role}:\n\n${elementsString}\n\n${delimiterBar}`;
}).join('\n');
}).join('\n'); // eslint-disable-next-line no-console
console.log(rolesStr);
}
{
"name": "@testing-library/dom",
"version": "5.5.1",
"version": "5.5.2",
"description": "Simple and complete DOM testing utilities that encourage good testing practices.",

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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