Note that `export default` no longer modifies `module.exports`, but simply
defines `exports.default`, so these two import styles will work:
import DefaultExport from "./export-default-module.js"; // preferred
var DefaultExport = require("./export-default-module.js").default;
but this style will no longer work:
var DefaultExport = require("./export-default-module.js");
This command builds the app with a different directory for
`.meteor/local`, including built packages and the app database. This
allows running `meteor test-app` and `meteor test` in parallel
for a given app, with DB isolation.
Also, we've changed how test driver packages work (as used for
`meteor test-packages`, like "test-in-browser"). Instead of automatically
running tests when they load, they export a `runTests` function that
you should call when you're ready to run tests.
When running `meteor test-app` or `meteor test-packages` a new additional
last line of code is added that calls `Meteor.startup(...runTests()...)`
TODO:
* Implement `testOnly` packages. The current pattern of reading a global
from `package.js` won't work for published packages, which are stored
as metadata, not code.
* Let you choose a test driver package as an argument to `meteor test-app`
* Demonstrate that a Mocha test and driver package are possible to write.
* Expose Meteor.isTest, Meteor.isIntegrationTest, Meteor.isUnitTest
* Implement `meteor test-app --unit` which only loads test files
* `meteor test-app` should load ALL *.tests?.* files, including ones
inside imports/ directories
See https://github.com/meteor/meteor/pull/5562/files for a discussion. Basically Cordova doesn't really support
a) Urls with @'s in them
b) Urls that don't point to fixed commits.
As this branch allows both of the above (and our NPM support does reasonably handle a+b), we split the way we handle cordova + npm URLs a little.
If $METEOR_BINARY_DEP_WORKAROUND is set, then when bundling for a
non-host platform (build/bundle/deploy commands only), if a package has
no server unibuild for the target architecture, use the host
architecture and replace the npm modules with a package.json and
npm-shrinkwrap.json. Also write out a top-level setup.sh script (inside
programs/server) which runs npm install in all such directories.
To support this, we make sure to save the package.json and
npm-shrinkwrap.json files in various intermediate directories in case we
need them later. (We put them inside node_modules because that is what
gets copied from source tree to isopack.)
Exclude core packages (whose versions are pinned) from being printed
when we say:
"Newer versions of the following indirect dependencies are available".
This is a temporary workaround for an issue that occurs when building
an app that uses Crosswalk.
We usually attempt to copy android-release-unsigned.apk to the root
build dir after a successful release build, but because Crosswalk
depends on native code, the resulting apk is architecture-specific
(android-armv7-release-unsigned.apk and
android-x86-release-unsigned.apk).
For now, I’m just adding a check so we don’t throw ENOENT. Built apks
can be found as usual in android/project/build/outputs/apk, they’re
just not copied to the root build dir.
UX Changes:
- Added a `--galaxy` option to selftest to run tests against galaxy.
Self-test will NOT run those tests without this option. Self-test will not run any
other tests WITH this option.
The motivation here is two-fold:
- We want to make it easy to use self-test to test Galaxy without running a bunch
of extra tests. At least, we want this right now, while Galaxy is still in development.
- Galaxy is currently pretty unstable&slow; we don't want to run our regular test suite against
Galaxy all the time and slow down the tool development process. Additionally, the environment
variables required by Galaxy are a pain to set.
This is a TEMPORARY situation. Eventually, we will want to either merge the two tests together
(especially once we rotate out Mother...) or we will have a separate unrelated Galaxy test suite
and move a lot of this stuff here. With time, it will also become more obvious what a better default
(run Galaxy tests always/run Galaxy tests never/run non-Galaxy-specific tests against Galaxy) is.
The changes should be pretty self-contained.
- Added some number of environment variables to use with --galaxy tests. This is a bit complicated
and will be documented in
https://mdg.hackpad.com/GalaxyECS-Admin-tasks-RTXJ5YW8pDv#:h=Testing-Galaxy-with-selftest.
Walkthrough:
- galaxy-utls.js contains basic utils for running Galaxy tests. Use environment variables, etc.
- galaxy.js contains the acutal test
- simple-app is an app that responds to HTTP requests and serves some html that we can test to be running
- minor changes to config.js to allow overriding of the domain name
- minor changes to auth.js to allow us to automatically login as the (new) test user and use that
login to start a DDP collection.
- move a function out of deploy-settings.js into test-utils.js
- some minor additions to test-utils.js
Reviewed in https://github.com/meteor/meteor/pull/4997.
Cordova plugin IDs have changed as part of moving to npm. We convert
old plugin IDs to new IDs in the 1.2.0-cordova-changes upgrader, when
adding plugins, and when preparing for build.