Ignored | Statements | Branches | Functions | Lines | none | 100% (16 / 16) |
100% (8 / 8) |
100% (4 / 4) |
100% (16 / 16) |
---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 | /* istanbul instrument in package uglifyjs */ /* jslint-utility2 */ /*jslint bitwise: true, browser: true, maxerr: 4, maxlen: 100, node: true, nomen: true, regexp: true, stupid: true */ (function () { 'use strict'; var local; // run shared js-env code - init-before (function () { // init local local = {}; // init isBrowser local.isBrowser = typeof window === "object" && typeof window.XMLHttpRequest === "function" && window.document && typeof window.document.querySelectorAll === "function"; // init global local.global = local.isBrowser ? window : global; // re-init local local = local.global.local = (local.global.utility2 || require('utility2')).requireReadme(); // init test local.testRunInit(local); }()); // run shared js-env code - function (function () { local.testCase_uglify_default = function (options, onError) { /* * this function will test uglify's default handling-behavior */ options = {}; // test css handling-behavior options.data = local.uglify('body { margin: 0; }', 'aa.css'); // validate data local.assertJsonEqual(options.data, 'body{margin:0;}'); // test js handling-behavior options.data = local.uglify('aa = 1', 'aa.js'); // validate data local.assertJsonEqual(options.data, 'aa=1'); onError(); }; }()); }()); |