New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@isthatcentered/tickable

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isthatcentered/tickable

```bash npm install — save @isthatcentered/tickable@beta ```

beta
latest
Source
npmnpm
Version
1.0.0-beta.0
Version published
Maintainers
1
Created
Source

An NPM library to help with react async testing

npm install — save @isthatcentered/tickable@beta

describe( `No results found`, () => {
	beforeEach( () => {
		mock.mockImplementation( () =>
			Tickable( response ) )  // Tickable returns a Promise that will resolve on process.nextTick
	} )
	
	test( `Displays a message`, async () => {
		const wrapper = mount( <App/> )
		
		// At this point, nextTick hasn't happened so Promise is still unresolved
		
		await tick() // Force our Tickable promise resolve
		
		// Now we can test expectations depending on our promise resolve
		expect( wrapper ).toHaveText( /nothing found/i )
	} )
} )

Keywords

react

FAQs

Package last updated on 15 Jan 2019

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