xolvio / rtd

DEPRECATED: The Test Runner for Meteor
164 stars 37 forks source link

Coverage Problem #75

Closed Nomeasmo closed 11 years ago

Nomeasmo commented 11 years ago

I added a reset button to the leadership test and it passes the acceptance test but the coverage report shows an error.

    Template.leaderboard.events({
        'click input.inc': function () {
            Players.update(Session.get("selected_player"), {$inc: {score: 5}});
        },
        'click input.reset': function () {
            // Cover me
            Players.update(Session.get("selected_player"), {$set: {score: 0}});
        }
    });
Nomeasmo commented 11 years ago

Sorry expected to have coverage in acceptance tests.

Coverage is checked only for unit tests, which is fine.

xolvio commented 11 years ago

Hi

Coverage checks are also for acceptance tests. What isn't working?

Nomeasmo commented 11 years ago

If I comment out "describe("Template.leaderboard [click input.inc] event", .." in the leadership example, the coverage fails although the acceptance test calls this function. On the other hand if the acceptance test for "it("increment the player points by five", ..." is commented out, coverage does not comply.

Tried using Node 10.0.5 and current .18

xolvio commented 11 years ago

Thank you, I'll investigate and report back

Nomeasmo commented 11 years ago

If starting grunt --debug I do have the following error:

 Running "bgShell:instrumentCode" (bgShell) task
 [D] Task source: /Users/xxx/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee
  => Errors prevented startup:

While building the application:
error: no such package: 'istanbul-middleware-port'
error: no such package: 'meteor-fixture'

=> Your application has errors. Waiting for file change.
=> Modified -- restarting.

. Processed [4] files in 0 secs

samhatoum commented 11 years ago

This is has been fixed as here: https://github.com/xolvio/rtd/issues/82