Moved property tests to the main suite
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.
This commit is contained in:
16
spec/helpers/requireFastCheck.js
Normal file
16
spec/helpers/requireFastCheck.js
Normal file
@@ -0,0 +1,16 @@
|
||||
(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());
|
||||
Reference in New Issue
Block a user