Allow for JS Files with no Functions when generating Coverage Report #1

Closed
wants to merge 244 commits into
from

Conversation

Projects
None yet
8 participants

foxxtrot commented Jan 9, 2012

Fixes Issue #68 in YUITest Trac

Nicholas C. ... and others added some commits Nov 1, 2009

Nicholas C. Zakas Try to extract function names from object literal assignments a58e325
Nicholas C. Zakas Much better function expression name detection 404a20c
Nicholas C. Zakas Bumped version number 60849fb
Nicholas C. Zakas YUI Test Selenium initial checkin cb47d05
Nicholas C. Zakas Renamed utility 1514e9a
Nicholas C. Zakas Removed JSON dependency ba1e5e1
Nicholas C. Zakas Working prototype 5559f7f
Nicholas C. Zakas Updates for Selenium driver fa8d6ff
Nicholas C. Zakas Typo fix 714ace9
Nicholas Added support to instrument all files in a directory 65ef132
Nicholas Fixed bug that prevented coverage report generation ec38c26
Nicholas Added more command line options c4e3d13
Nicholas Added ability to place test name into the filename a955382
Nicholas Better error handling/reporting 789d542
Nicholas Added XML configuration file reading abf556c
Nicholas C. Zakas Updates to ensure compilation in Java 1.5 fd7a6d3
Nicholas C. Zakas Updates to ensure compilation in Java 1.5 ec163dc
Nicholas C. Zakas Bumped version to 0.3.2 58d19ab
Nicholas New command line options 53eaa75
Nicholas Updates for coverage d43ccab
Nicholas Merging changes 319a058
Nicholas Code cleanup for selenium driver 4517a93
Nicholas Added ability to load test XML from a URL 2fa558c
Nicholas Refactored Selenium driver results output b0c5364
Nicholas Implemented --erroronfail for Selenium driver 9b45670
Nicholas Removed TestConfigHandler, rolled into TestConfig 0aa2165
Nicholas Fixed bug when parsing tests XML files where query string was being c…
…hopped
6e6be33
Nicholas Implemented properties file config for XML tests file f7cb4bd
Nicholas Added command line options for results and coverage output directories 11e734c
Nicholas Changed default file format cd687e2
Nicholas C. Zakas Created JavaScript directory 18dc654
Nicholas Minor updates c87b989
Nicholas Merge branch 'master' of git@github.com:nzakas/yuitest 5611046
Nicholas Initial reorg 3cc815d
Nicholas Reorganized code base d921bab
Nicholas Refactored report generation 174dc9f
Nicholas Fixed few remaining issues with coverage report generation bf92bce
Nicholas Added GCOV report format 25fb87f
Nicholas Updated report generators 4c87039
Nicholas YUI Test results classes 137253d
Nicholas TestCase tests 3726062
Nicholas Reorg 83a9bac
Nicholas Cleanup 5133d9b
Nicholas Beginning of test result writers 01c78d2
Nicholas Fixed parsing errors 9080595
Nicholas Updated faulty XML parsing 30c25c6
Nicholas Updated JUnitXML format 98b3e1a
Nicholas Updated JUnit format and tests e0c7269
Nicholas Fixed reporting errors 9f7bb41
Nicholas Updates to JUnit XML format b044002
Nicholas Patches to JUnit XML format 41dbbcc
@davglass davglass Initial Commit 4eb9a99
Nicholas C. Zakas Initial port from YUI 3 ebea61e
Nicholas C. Zakas Build scripts b8b5095
Nicholas Fixed timing issue for YUI 3 407c1a6
Nicholas Refactored test result converters a92c950
Nicholas Refactoring of test report writers 4fa3735
Nicholas Updated grammar licenses, build file, and readme 465ea4b
Nicholas Refactoring of coverage file report d30d21f
Nicholas Major refactoring of writers 8230a17
Nicholas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest 4d0e009
Nicholas Implemented TAP format for test results 6937293
Nicholas Bumped Selenium Driver version 6cfb6f8
Nicholas Updated tests 305017a
Nicholas Updated files d9d4b9b
Nicholas Added initial tests for FileReport 7416be9
Nicholas Move all JS instrumentation to the head of the file c51edb4
Nicholas Updated tests and implementing file report merging 895b4ca
Nicholas Added merge and first pass at LCOV 0366520
Nicholas Refactoring of coverage reporting 6245403
Nicholas LCOV HTML file reports 3e934ea
Nicholas Create appropriate directories for file reports 207c198
Nicholas Introduced DirectoryReport 71587aa
Nicholas Updates to directoryreport c35d788
Nicholas Updates to directoryreport tests 801df1f
Nicholas Added directory LCOV page eda82d0
Nicholas Added LCOV index page template 561ff31
Nicholas Fixed LCOV index report format 2011f41
Nicholas Refactoring of Ant build 2c15eba
Nicholas Major cleanup/refactoring c633d97
Nicholas Final updates for 0.5.0 6e24cd7
Nicholas Changed current.version to version.number for consistency with YUI Co…
…mpressor
bb8fa2c
Nicholas Fixed syntax problem when instrumenting certain files 7ea5442
Nicholas Refactored parser, better naming of anonymous functions 95c3285
Nicholas C. Zakas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest 3f638bf
Nicholas C. Zakas Initial checkin for JavaScript code 03ce653
Nicholas Fixed bug where quoted function names caused syntax errors in instrum…
…ented file
8506fea
Nicholas Updated grammar to allow 'new function' construct 8967a61
Nicholas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest e22cbf1
Nicholas Official 0.5.2 build bf472e8
Nicholas Removed duplicate files 9c5aa35
Nicholas Converted event simulation library 482080d
Nicholas Added reporting features 6fd805a
Nicholas Initial conversion of TestRunner 16f6e32
Nicholas Fixed JSLint errors 833e9c8
Nicholas Updated JS build system 744365d
Nicholas Fixed build issues 3a83ece
Nicholas Fixed a bunch of functionality that broke during porting. Also added …
…some unit tests.
a0f8457
Nicholas Fixed bug where LCOV output didn't include uncalled lines ac5d169
Nicholas Bumped version number ddda76f

YUI Builder and others added some commits Nov 4, 2010

YUI Builder Build: yuitest-1 1a79866
YUI Builder Build: yuitest-2 07c535f
YUI Builder Build: yuitest-3 fc1053f
YUI Builder Build: yuitest-4 956c0c7
Nicholas Added license file 2791334
Nicholas Removed extraneous PHP 32f2baa
Nicholas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest 8597498
Nicholas Created yuitest-node.js b1d1408
Nicholas Fixed bug with Reporter b8b5094
Nicholas Updated incorrect documentation for YUITest.Reporter 727d1db
Nicholas Fixed error with Selenium Driver and standalone YUI Test ff0684f
Nicholas Removed build_tmp directory 635bd60
nzakas Added init and destroy methods d46f045
nzakas Implemented context data 0e5e9f8
nzakas Fixed typo in license 7a7923c
nzakas First attempt at making an NPM package eac0eee
nzakas Cleaned up results reporting a bit 1e272a4
nzakas Minor tweaks 62abc2b
nzakas Added support for async:init 1cc0cd9
nzakas Error-proof init, setUp, tearDown, destroy 324ad29
nzakas Fixed tests ffe269c
nzakas First pass at Node.js CLI 3af05b2
nzakas Cleaned up node CLI 8c7c459
nzakas Merged in Dav's changes b6259f9
nzakas New build with Dav's changes 5eedefa
nzakas Updated docs b6a7048
nzakas Small updates for docs c1ca760
nzakas npm changes 300519f
nzakas Make tests runnable both in browser and Node.js 3a8ec8d
nzakas Small update to docs 9a472f2
nzakas Updated README 68f0817
nzakas Latest changes for Node.js 5e24913
nzakas Dav's fixes to make yuitest work in Node < 0.3.0 f395504
nzakas Increment npm version number 287a178
nzakas Fallback to stdout when stderr is not available 1d925be
nzakas Added groups support for TestCases and groups filter for running only…
… certain test cases
3005482
nzakas Fixed groups behavior 77d7bcc
nzakas Added group info to tests 9ae7ce2
nzakas Fixed error trapping in setUp/tearDown/init/destroy 5ca8275
nzakas Add stack trace to Node.js CLI output 8ea5628
nzakas Updated documentation 8036169
nzakas Error checking for displaying stack trace 099ec9e
nzakas Updated wait() tests to pass on node.js 67c845d
nzakas Updated README 596ec87
nzakas Added 'ignore' annotation for tests 66e66cf
nzakas Added 'fail' annotation to test cases ff09bcf
nzakas Added JUnitXML and TAP output for Node.js CLI 41d6123
Nicholas Fixed issue where a JS file with no functions throws an error e9d5c47
Nicholas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest 8d70a2e
Nicholas Fixed a few minor issues 6615b89
Nicholas Added unit tests for coverage instrumenter cc43e85
nzakas Changed --output to --format in Node.js cli dec7854
nzakas Changed require statement (refs #24) 2417360
nzakas Merge branch 'master' of yuisource.corp.yahoo.com:yuitest 4920277
Nicholas Report bad command line option (fixes #12) 8977f9e
Nicholas Merge branch 'master' of git@yuisource.corp.yahoo.com:yuitest 281f447
Nicholas Small for Node CLI and event simulate 285d692
nzakas Merge 67f5f26
nzakas Merge branch 'master' of yuisource.corp.yahoo.com:yuitest 051abd0
nzakas Merging changes 002f929
nzakas Added shell interpreter in cli.js (fixes #28) and updated way of assi…
…gning exit code (fixes #26)
84d5efc
nzakas Made sure that wait() behaves as documented (fixes #27) 8a6fae1
Nicholas Fixes for npm bundled YUI Test (fixes #30 and #31) 41b7ba6
Nicholas Updated build script to ensure that there are no \n characters in npm…
… files
3693441
@tivac tivac Switch to using a ByteArrayOutputStream then only writing to a file A…
…FTER the instrumentation is totally complete. Previously opening the output writer to a file meant that input & output files that were the same resulted in garbage files.
940dcec
@cpanel cpanel Prevent errors on successive TestRunner.run() calls cade0fb
@guozheng @reid guozheng add -x command line option to exclude directories and files from code…
… instrumentation

-x or --exclude <file path OR directory path>

Notes:

1. -x only works when input is a directory
2. path is relative to the input directory
3. use multiple -x <value> to exclude multiple paths
4. excluded paths are still copied over to make sure tests still work, they are just not instrumented by yuitest-coverage

Examples:

yuitest-coverage -d -o build -x node_modules -x middlewares/timeout.js src/main/javascript

This will skip instrumentation for src/main/javascript/node_modules and src/main/javascript/middleware/timeout.js

See: guozheng/yuitest@1052f01
See: guozheng/yuitest@c174442

Signed-off-by: Reid Burke <me@reidburke.com>
b272ee7
@AndyStricker AndyStricker Fix typo in ObjectAssert.hasKeys
Signed-off-by: Andreas Stricker <astricker@futurelab.ch>
0f12adc
@AndyStricker AndyStricker Fix wrong namespace to ComparisionFailure c0e6104
@cpanel cpanel fix CLI so it won't clobber absolute paths 70b9a49
@tivac tivac Extended YUITest.ObjectAssert.areEqual to enforce both objects having…
… the same # of keys

Includes tests for ObjectAssert.areEqual, they didn't exist previously. Implementing this required pulling in some code from YUI3 for their Object.keys implementation, it's been put into util/Object.js

Built files coming in another commit.

(Originally this was yui/yui3#13 but @nzakas requested it for YUITest Standalone, so here we are)
e3a95c3
@tivac tivac Built files for e3a95c3 c4a746d
@nzakas nzakas Merge pull request #15 from tivac/file-overwriting
Fixed so that you can overwrite a file w/ the instrumented version.
1ff636b
Nicholas C. Zakas Merged in tivac's changes a1db9a9
@tivac tivac Fixing bad reference to unsafeNatives var
Also fixed it so that object.keys shim would actually work (oops)
49e36ad
@tivac tivac Built files for 49e36ad 94af71c
@nzakas nzakas Merge pull request #19 from tivac/unsafeNatives-fix
Bad unsafeNatives reference fix
99e309d
@rgrove rgrove Merge branch 'master' of https://github.com/nzakas/yuitest into nzaka…
…s-master
486d8a2
Nicholas C. Zakas Rationalized CLI interface, made Rhino CLI interface, updated npm format 6c68dd3
Nicholas C. Zakas Renamed yuitest-rhino to yuitest-rhino-cli to match yuitest-node-cli c678867
Nicholas C. Zakas Updated command line text d1658b4
@rgrove rgrove Merge branch 'master' of https://github.com/nzakas/yuitest into nzaka…
…s-master
64e67e5
Nicholas C. Zakas Merge branch 'fixes' of https://github.com/AndyStricker/yuitest into …
…Andy
7d9e1f9
Nicholas C. Zakas Merged in AndyStricker changes 4fbc45a
Nicholas C. Zakas Ensure ArrayAssert works properly (fixes #43) 6bd2c0d
Nicholas C. Zakas Added Assert.pass() (fixes #46) 9927877
Nicholas C. Zakas Merging in cpanel changes 6feb07b
Nicholas C. Zakas Merged in cpanel changes (fixes #51) 161ddaf
Nicholas C. Zakas Fix documentation links fb593c0
@nzakas nzakas Merge pull request #1 from yui/master
Latest changes
a395805
Nicholas C. Zakas Fixed missing comma in file da7c0cd
Nicholas C. Zakas Merge branch 'master' of github.com:nzakas/yuitest 9048bf0
Nicholas C. Zakas Fixed issue with mock properties (fixes #55) 32fd2fe
Nicholas C. Zakas Updated instrumentation behavior (fixes #49) cb8a88c
Nicholas Updated NPM build ae991e1
Nicholas C. Zakas Updating JARs 4e84358
Nicholas C. Zakas Fixes for node issues (#2531556) 940897c
@foxxtrot foxxtrot Tests to make sure the return value of getFunctionNames is not null w…
…hen generating a coverage report. Fixes #68
f4cd2fe

foxxtrot commented Jan 9, 2012

Whoa, wrong person. Sorry.

foxxtrot closed this Jan 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment