Skip to content

Commit

Permalink
clearly separate unit tests and integration tests for meteor packages
Browse files Browse the repository at this point in the history
  • Loading branch information
angelcabo committed Jul 6, 2015
1 parent 65da535 commit cbe7040
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions meteor-app/packages/infinite-undo/package.js
Expand Up @@ -29,6 +29,6 @@ Package.onUse(function(api) {
Package.onTest(function(api) {
api.use(["tinytest", "underscore"]);
api.use("angelcabo:infinite-undo");
api.addFiles("lib/entity-repository_tests.js", "server");
api.addFiles("lib/rollback-replay-stack_tests.js", "server");
api.addFiles("test/integration/entity-repository_tests.js", "server");
api.addFiles("test/integration/rollback-replay-stack_tests.js", "server");
});
Expand Up @@ -9,7 +9,7 @@ describe('CommandRegistry', function() {

beforeEach(function () {
this.Stub = function () {};
this.context = loadFile(path.resolve(__dirname, '../lib/command-registry.js'), { InfiniteUndo: {} });
this.context = loadFile(path.resolve(__dirname, '../../lib/command-registry.js'), { InfiniteUndo: {} });
});

it('should accept a command definition object with an "execute" function which will be invoked when the command\'s name is called on the prototype object', function (done) {
Expand Down
2 changes: 1 addition & 1 deletion meteor-app/packages/parallels-canvas-manager/package.js
Expand Up @@ -38,5 +38,5 @@ Package.onTest(function(api) {
]);

// All test files
api.addFiles("lib/canvas-commands/createBitCommand_tests.js", "server");
api.addFiles("test/integration/canvas-commands/createBitCommand_tests.js", "server");
});
4 changes: 2 additions & 2 deletions test-scripts/bin/run_meteor_package_units.sh
Expand Up @@ -18,9 +18,9 @@ fi
TESTS_FAILED=0
PACKAGES_FAILED=""
for pkg in ${PACKAGES}; do
if [ -d "meteor-app/packages/${pkg}/test" ]; then
if [ -d "meteor-app/packages/${pkg}/test/unit" ]; then
echo ">>> Testing package '${pkg}'..."
mocha meteor-app/packages/${pkg}/test || {
mocha meteor-app/packages/${pkg}/test/unit || {
echo "ERROR: Tests for package '${pkg}' failed."
TESTS_FAILED=1
PACKAGES_FAILED="${PACKAGES_FAILED} ${pkg}"
Expand Down

0 comments on commit cbe7040

Please sign in to comment.