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

@hashicorp/react-accordion

Package Overview
Dependencies
Maintainers
16
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/react-accordion - npm Package Compare versions

Comparing version 0.0.1-react-v2.1 to 0.0.1-react-v2.2

2

package.json
{
"name": "@hashicorp/react-accordion",
"version": "0.0.1-react-v2.1",
"version": "0.0.1-react-v2.2",
"description": "A block that displays a set of title + content items, with content collapsed by default, but expandable to view. Also includes an optional heading for the block.",

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

@@ -57,35 +57,2 @@ import React from 'react'

})
/*
@TODO test below relies on CSS to test visibility
jest-transform-css seems to only support PostCSS with CSS modules
Temporarily deferring these types of tests until we decide to either:
1. Adopt CSS modules
2. Find a way to expose transpiled CSS to Jest's DOM without CSS modules
*/
/*
it('should toggle content visibility when the title is clicked', () => {
const { container, getByText } = render(
<AccordionItems {...defaultProps} />
)
// Re-render seems to be required to get styles to register correctly, not sure why
render(<AccordionItems {...defaultProps} />, {
container,
getByText
})
const headingElem = getByText(defaultProps.items[0].heading)
const contentElem = getByText(defaultProps.items[0].content)
expect(headingElem).toBeVisible()
expect(contentElem).not.toBeVisible()
fireEvent.click(headingElem)
expect(contentElem).toBeVisible()
fireEvent.click(headingElem)
// Re-render seems to be required to get styles to register correctly, not sure why
render(<AccordionItems {...defaultProps} />, {
container,
getByText
})
expect(contentElem).not.toBeVisible()
})
*/
})

@@ -32,35 +32,2 @@ import React from 'react'

})
/*
@TODO tests below relies on CSS to test visibility
jest-transform-css seems to only support PostCSS with CSS modules
Temporarily deferring these types of tests until we decide to either:
1. Adopt CSS modules
2. Find a way to expose transpiled CSS to Jest's DOM without CSS modules
*/
/*
it('should have visible content when expanded', () => {
const someText = 'This is some test text for this test'
const { getByText } = render(
<Collapsible isCollapsed={false}>{someText}</Collapsible>
)
const contentElem = getByText(someText)
expect(contentElem).toBeVisible()
})
it('should not have visible content when collapsed', () => {
const someText = 'This is some test text for this test'
const { container, getByText } = render(
<Collapsible isCollapsed={true}>{someText}</Collapsible>
)
// Re-render seems to be required to get styles to register correctly.
// I'm not sure why.
render(<Collapsible isCollapsed={true}>{someText}</Collapsible>, {
container,
getByText
})
const contentElem = getByText(someText)
expect(contentElem).not.toBeVisible()
})
*/
})

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