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

@instructure/ui-test-locator

Package Overview
Dependencies
Maintainers
0
Versions
1195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-test-locator

A locator component for finding components by their defined selector in tests.

  • 10.2.3-snapshot-1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.5K
decreased by-2.47%
Maintainers
0
Weekly downloads
 
Created
Source

category: packages

ui-test-locator

npm MIT License Code of Conduct

A locator component for finding components by their defined selector in tests.

Installation

npm install @instructure/ui-test-locator

Usage

// MyComponent.js
import { testable } from '@instructure/ui-testable'

@testable()
export class MyComponent extends React.Component {
  ...
}

// MyComponentLocator.js
import { locator } from '@instructure/ui-test-locator'
import { MyComponent } from './MyComponent'

export const MyComponentLocator = locator(MyComponent.selector)

// MyComponent.test.js
import { MyComponent } from './MyComponent'
import { MyComponentLocator } from './MyComponentLocator.js'

it('should render', () => {
  await mount(<MyComponent />)

  const myComponent = await MyComponentLocator.find()

  expect(myComponent).to.exist()
})

FAQs

Package last updated on 17 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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