Files
meteor/tools/tests/custom-minifier.js
Renan Castro 875f656a6f Merge branch 'release-2.6.1' into release-2.7
# Conflicts:
#	meteor
#	npm-packages/meteor-babel/package-lock.json
#	npm-packages/meteor-babel/package.json
#	packages/babel-compiler/.npm/package/npm-shrinkwrap.json
#	packages/babel-compiler/package.js
#	packages/meteor-tool/package.js
#	scripts/admin/meteor-release-experimental.json
#	scripts/dev-bundle-tool-package.js
2022-02-18 17:29:03 -03:00

55 lines
1.5 KiB
JavaScript

import selftest, {Sandbox} from '../tool-testing/selftest.js';
selftest.define('custom minifier - devel vs prod', function (options) {
const s = new Sandbox({
clients: options.clients
});
s.createApp('myapp', 'custom-minifier');
s.cd('myapp');
s.testWithAllClients(function (run) {
run.waitSecs(20);
run.match('myapp');
run.match('proxy');
run.connectClient();
run.waitSecs(4800);
// XXX when minifiers start getting applied to server target, this
// outcome would change
run.match('Message: foo');
run.match('production_css: rgb(255, 0, 0)');
run.match('development_css: rgb(0, 0, 0)');
run.match('minified_lazy: rgb(0, 255, 0)');
run.match('Message (client): production_js');
run.stop();
}, { args: ['--production'],
testName: 'custom minifier - devel vs prod - part 1',
testFile: 'customer-minifier.js' });
s.testWithAllClients(function (run) {
run.waitSecs(20);
run.match('myapp');
run.match('proxy');
run.connectClient();
run.waitSecs(250);
// XXX when minifiers start getting applied to server target, this
// outcome would change
run.match('Message: foo');
run.match('production_css: rgb(0, 0, 0)');
run.match('development_css: rgb(255, 0, 0)');
run.match('minified_lazy: rgb(0, 255, 0)');
run.match('Message (client): development_js');
run.stop();
},{
testName:'custom minifier - devel vs prod - part 2',
testFile: 'custom-minifier.js'});
});