Ignored | Statements | Branches | Functions | Lines | none | 100% (15 / 15) |
100% (8 / 8) |
100% (4 / 4) |
100% (15 / 15) |
---|
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 62 63 64 65 66 67 68 69 70 71 72 | 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.testRunDefault(local); }()); // run shared js-env code - function (function () { local.testCase_uglify_default = function (options, onError) { /* * this function will test uglify's default handling-behavior */ // test .css handling-behavior local.assertJsonEqual( local.uglify('body { margin: 0; }', 'aa.css'), 'body{margin:0;}' ); // test .html handling-behavior local.assertJsonEqual( local.uglify('<div>\t\n\taa\n<pre>\nbb\n</pre>\n</div>', 'aa.html'), '<div> aa <pre>\nbb\n</pre> </div>' ); // test .json handling-behavior local.assertJsonEqual( local.uglify('{ "aa": true }', 'aa.json'), '{"aa":true}' ); // test js handling-behavior local.assertJsonEqual( local.uglify('aa = 1', 'aa.js'), 'aa=1' ); onError(null, options); }; }()); }()); |