-
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Are you looking for https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/src/arbitrary/webUrl.ts#L73? (I mean For now, as it has not been exposed yet, I'd recommend you to take inspiration from it. But definitely if useful, we should expose it to users so that they can use it directly. |
Beta Was this translation helpful? Give feedback.
-
Currently I'm using: fc.assert(
fc.property(
fc
.array(
fc.webSegment().filter((s) => !!s.length),
{ minLength: 1 }
)
.map((segments) => {
return `/${segments.join('/')}`;
}),
fc.context(),
(input, ctx) => {
ctx.log(`input: ${input}, output: ${validateStatsPath(input)}`);
expect(validateStatsPath(input)).toBe(true);
}
)
); as my setup, which is also what prompted #3179 since I see no way to ensure that an output of |
Beta Was this translation helpful? Give feedback.
Are you looking for https://github.com/dubzzz/fast-check/blob/main/packages/fast-check/src/arbitrary/webUrl.ts#L73? (I mean
pathArb
)? For the moment, we have not exposed it, but we should probably if it can be needed on its own 🤔For now, as it has not been exposed yet, I'd recommend you to take inspiration from it. But definitely if useful, we should expose it to users so that they can use it directly.