Property tests can only run in Node, so they were previously in another directory that only gets run in Node. Now they're next to the related non-property tests and marked pending in the browser. This makes it more likely that a developer who normally only runs tests in the browser will notice and run them.
17 lines
376 B
JavaScript
17 lines
376 B
JavaScript
(function(env) {
|
|
var NODE_JS =
|
|
typeof process !== 'undefined' &&
|
|
process.versions &&
|
|
typeof process.versions.node === 'string';
|
|
|
|
env.requireFastCheck = function() {
|
|
if (!NODE_JS) {
|
|
env.pending(
|
|
"Property tests don't run in the browser. Use `npm test` to run them."
|
|
);
|
|
}
|
|
|
|
return require('fast-check');
|
|
};
|
|
})(jasmine.getEnv());
|