Jetpack/Testing: Difference between revisions

No edit summary
Line 25: Line 25:
A package is defined as such by the presence of a file called "package.json" in the root directory. Among other things, "package.json" includes an string called "tests" which describes where the package test suites live. If this is not defined, the default is the "tests" or "test" directory under the package root.
A package is defined as such by the presence of a file called "package.json" in the root directory. Among other things, "package.json" includes an string called "tests" which describes where the package test suites live. If this is not defined, the default is the "tests" or "test" directory under the package root.


So if you navigate to a package's root directory (containing a package.json file) and execute "cfx test", <code>cfx</code> will:
So if you navigate to a package's root directory (containing a package.json file) and execute <code>cfx test</code>, <code>cfx</code> will:


# initialize the tests directory using the "tests" value inside "package.json", or the top-level "tests/" or "test" directory
# initialize the tests directory using the "tests" value inside "package.json", or the top-level "tests/" or "test" directory
canmove, Confirmed users
737

edits