| Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Path : /proc/self/root/home/livedhms/lmgt/node_modules/fast-check/ |
| Current File : //proc/self/root/home/livedhms/lmgt/node_modules/fast-check/runkit.cjs |
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);
}),
);