mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Be able to run constraint-solver tests on client
... but don't by default
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
// test takes to run. Because they are slow, they don't run when you
|
||||
// run tests unless you turn them on with an environment variable.
|
||||
|
||||
var runBenchmarks = !!process.env.CONSTRAINT_SOLVER_BENCHMARK;
|
||||
// The benchmarks can totally be run on the client, it's just harder to
|
||||
// detect the environment variable.
|
||||
var runBenchmarks = Meteor.isServer && !!process.env.CONSTRAINT_SOLVER_BENCHMARK;
|
||||
|
||||
var railsCatalog = getCatalogStub(railsGems);
|
||||
var sinatraCatalog = getCatalogStub(sinatraGems);
|
||||
|
||||
@@ -12,8 +12,9 @@ Package.onUse(function (api) {
|
||||
api.use(['underscore', 'ejson', 'check', 'package-version-parser',
|
||||
'binary-heap', 'random', 'logic-solver']);
|
||||
api.addFiles(['datatypes.js', 'catalog-cache.js', 'catalog-loader.js',
|
||||
'constraint-solver-input.js', 'solver.js']);
|
||||
api.addFiles(['constraint-solver.js', 'resolver.js', 'constraints-list.js',
|
||||
'constraint-solver-input.js', 'solver.js',
|
||||
'constraint-solver.js']);
|
||||
api.addFiles(['resolver.js', 'constraints-list.js',
|
||||
'resolver-state.js', 'priority-queue.js'], ['server']);
|
||||
});
|
||||
|
||||
@@ -22,13 +23,21 @@ Package.onTest(function (api) {
|
||||
api.use(['tinytest', 'minimongo', 'package-version-parser']);
|
||||
api.use('underscore');
|
||||
|
||||
// data for big benchmarky tests
|
||||
api.addFiles('test-data.js', ['server']);
|
||||
// Only test the package on the server. Mainly because of
|
||||
// package-version-parser, which uses the semver npm module,
|
||||
// this package is not "IE 8 clean". However, it works on
|
||||
// modern browsers.
|
||||
var where = ['server'];
|
||||
|
||||
api.addFiles('datatypes-tests.js', ['server']);
|
||||
api.addFiles('catalog-cache-tests.js', ['server']);
|
||||
api.addFiles('constraint-solver-tests.js', ['server']);
|
||||
api.addFiles('benchmark-tests.js', ['server']);
|
||||
api.addFiles('resolver-tests.js', ['server']);
|
||||
api.addFiles('input-tests.js', ['server']);
|
||||
// data for big benchmarky tests
|
||||
api.addFiles('test-data.js', where);
|
||||
|
||||
api.addFiles('datatypes-tests.js', where);
|
||||
api.addFiles('catalog-cache-tests.js', where);
|
||||
api.addFiles('constraint-solver-tests.js', where);
|
||||
api.addFiles('benchmark-tests.js', where);
|
||||
api.addFiles('input-tests.js', where);
|
||||
|
||||
// tests of old resolver
|
||||
api.addFiles('resolver-tests.js', 'server');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user