aboutsummaryrefslogtreecommitdiff
path: root/test/run-tests.js
AgeCommit message (Collapse)Author
2018-07-13fix corner cases in `preserve_line` (#3212)Alex Lam S.L
2018-06-06general clean-ups (#3175)Alex Lam S.L
2018-05-11replace `mocha` dependency (#3131)Alex Lam S.L
2018-04-26workaround test failures in Node.js 10 (#3102)Alex Lam S.L
2018-03-29improve source map granularity (#3030)Alex Lam S.L
fixes #3023
2018-03-11preserve case when `inline_script` (#2991)Alex Lam S.L
fixes #2989
2018-03-04improve `test/run-test.js` performance (#2971)Alex Lam S.L
- allow reuse of contextified sandbox - minimise bottleneck from `vm.createContext()`
2018-02-24minor clean-ups (#2951)Alex Lam S.L
2018-02-13report options upon reminify input error (#2911)Alex Lam S.L
2018-01-04reminify tests upon `expect_stdout` (#2716)Alex Lam S.L
2018-01-04forbid block-scoped `AST_Defun` in strict mode (#2718)Alex Lam S.L
2017-11-24fix `rename` (#2501)Alex Lam S.L
- suppress spurious `rename` from `commander` - handle `AST_SymbolCatch` correctly
2017-07-29improve `mangle.properties` (#2261)Alex Lam S.L
- include dead code when `keep_quoted` - unify `keep_quoted` & `reserved` - make `test/run-tests.js` consistent with `minify()` fixes #2256
2017-06-23synchronise `mangle.properties` for `minify()` & `test/compress` (#2151)Alex Lam S.L
2017-06-15fix parsing of `expect_stdout` (#2096)Alex Lam S.L
fixes #2095
2017-06-13allow `expect_stdout` to specify `Error` (#2087)Alex Lam S.L
2017-05-18make `expect_stdout` node version specific (#1963)Alex Lam S.L
... via semver string on `node_version` label.
2017-05-15fix & improve coverage of `estree` (#1935)Alex Lam S.L
- fix `estree` conversion of getter/setter - fix non-directive literal in `to_mozilla_ast()` - revamp `test/mozilla-ast.js` - reuse `test/ufuzz.js` for code generation - use `acorn.parse()` for creating `estree` - extend `test/ufuzz.js` for `acorn` workaround - catch variable redefinition - non-trivial literal as directive - adjust options for tolerance Miscellaneous - optional semi-colon when parsing directives fixes #1914 closes #1915
2017-05-08deprecate low level API (#1877)Alex Lam S.L
fixes #1872
2017-04-01implement `test/sandbox.js` (#1749)Alex Lam S.L
- `test/run-tests.js` and `test/ufuzz.js` now shares the same `run_code()` and `same_stdout()` - re-enable fuzzer to generate top-level `NaN`, `Infinity` & `undefined` - attempt to show beautified output only when `run_code()` output is preserved
2017-03-29remove UGLIFY_DEBUG (#1720)Alex Lam S.L
fixes #1719
2017-03-24fix expect_stdout (#1642)Alex Lam S.L
`compress()` may modify input ASTs add tests for #1627 & #1640
2017-03-23introduce compressor.info() (#1633)Alex Lam S.L
report the following only when `options.warnings = "verbose"` - unused elements due to inlining - collpased variables
2017-03-19make `expect_stdout` work on Node.js 0.12 (#1623)Alex Lam S.L
That particular version of Node.js has messed up error messages, so provide a version-specific workaround. Also fixed an formatting issue which would cause `expect_stdout` to fail if error message contains excerpts of input. Apply `expect_stdout` to more applicable tests.
2017-03-18handle runtime errors in `expect_stdout` (#1618)Alex Lam S.L
allow test to pass if both `input` and `expect` throws the same kind of error
2017-03-18fix top-level directives in compress tests (#1615)Alex Lam S.L
`input` and `expect` are parsed as `AST_BlockStatement` which does not support `AST_Directive` by default. Emulate that by transforming preceding `AST_SimpleStatement`s of `AST_String` into `AST_Directive`.
2017-03-16extend `test/run-tests.js` to optionally execute uglified output (#1604)Alex Lam S.L
fixes #1588
2017-03-10support multi-line string in tests (#1590)Alex Lam S.L
`expect_exact` sometimes have multiple lines and `\n` are hard to read. Use array of strings to emulate line breaks and improve readability.
2017-02-21fix duplicated test namesalexlamsl
previously test cases with the same name would be skipped except for the last one `test/run-test.js` will now report duplicated names as errors closes #1461
2017-01-19Have minify() and tests use figure_out_scope() as uglifyjs CLI doeskzc
Clarify docs, help and tests for --support-ie8 and screw_ie8=false
2016-10-27Pass mangle options to figure_out_scope before mangling in testsAnthony Van de Gejuchte
2016-08-14Test reparsing test/compress/*.js outputkzc
2016-06-19Respect quote style in object literalsShrey Banga
The option added in fbbaa42ee55a7f753f7cab9b1a905ccf73cf26d5 wasn't being respected inside object literals, so quoted property names would still be stripped out with this option. This is mostly a corner-case, but useful when the output is passed to something like the Closure compiler, where quoted property names can be used to prevent mangling.
2016-06-19Don't mix strings with directives in outputAnthony Van de Gejuchte
* Don't interpret strings with escaped content as directive * Don't interpret strings after empty statement as directive * Adapt output to prevent strings being represent as directive * Introduce UGLIFY_DEBUG to allow internal testing like EXPECT_DIRECTIVE
2016-06-09Catch errors when compression test fails to parseAnthony Van de Gejuchte
2016-05-04Fix regression causing tests to fail on windowsAnthony Van de Gejuchte
2016-04-19Add `passes` compress option. Fix duplicate compress warnings.kzc
2016-04-12Add base54.reset() to compress testsRichard van Velzen
Without this reset, char counts bleed to next tests. One test had a bad expect clause.
2016-04-11Fix warnings for referenced non-hoisted functions.kzc
Fixes #1034 Also added `expect_warnings` functionality to test framework.
2016-01-14Never mangle arguments and keep them in their scopeAnthony Van de Gejuchte
Fixes #892 Helped-by: kzc
2015-12-27Add mocha testsAnthony Van de Gejuchte
2015-11-12Replace util.error with console.logMihai Bazon
2015-10-28Allow specification beautify options in testsRichard van Velzen
Caught an error in #847 as well - `output` wasn't passed anywhere which led to an exception. `options` was available though.
2015-10-20Fix #836Fábio Santos
2015-10-12Fix testsMihai Bazon
2015-08-05Fix mangling of property names which overwrite unmangleable propertiesRichard van Velzen
Fixes #747.
2015-07-29Replace util.puts in run-tests with console.logRichard van Velzen
See d2dda34b2a8de310f26a26e58ed28275ba5ecc7f
2015-04-14Added expect_exact for testing the OutputStreamFábio Santos
This works almost exactly like `expect`, except that you pass a literal string of which the result is compared with the generated output.
2014-08-03Added generative testing for AST conversions.Ingvar Stepanyan
2013-10-27Display number of failed tests and corresponding filesMihai Bazon