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

slow-promise

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slow-promise

Slow down your promises

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

slow-promise

Slow-Promise gives you ES6 promises in roughly 20 LOC and 900 bytes (not even minified).

Its downsides are

  • it's slow,
  • it relies on another Promise implementation being present doing the hard work.

Example

Slow-Promise surfacing a flaky test in Puppeteer: ./examples/puppeteer/

Why?

The author wants to make browser testing a better experience, most prominently more stable. They believe that one reason tests via a browser tend to be fragile and flaky is because humans are generally bad at modelling asynchrony.

A hypothetical

Assume on a good day you write a new passing test, only to see it fail rather randomly the following day. It just happened to be that your app felt somewhat slow and unresponsive. Chances are you just sit through it and wait for everything to go faster again. Naturally your tests will be back to green.

What if this happens again and again? Your team will get used to brittle test, and start re-running failing tests. Eventually this will become the norm.

What if you could stop this process early on, and just surface those poorly written tests? Those which depend on your application being at its best! Imagine you could slow down your app on every given day and force those out.

Slow-Promise isn't good much, but it is good at that!

Howto

$ npm test
$ npm run dist
$ open test_integration.html

Keywords

FAQs

Package last updated on 23 Apr 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

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