Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including fast-check with all npm packages installed. Try it out:

const fc = require('fast-check'); // Function under test function isSubstring(pattern, text) { return text.indexOf(pattern) !== -1; } // Property based test fc.assert( fc.property(fc.string(), fc.string(), fc.string(), (a, b, c) => { // For any a, b, c strings // b is a substring of a + b + c return isSubstring(b, a + b + c); }), );

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

fast-check v3.13.2

Property based testing framework for JavaScript (like QuickCheck)

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free