meteor / todos

The example app "Todos", written following the Meteor Guide
Other
535 stars 367 forks source link

tests fail when package audit-argument-checks is added #103

Closed orangewise closed 8 years ago

orangewise commented 8 years ago
$ meteor --version
Meteor 1.3

Steps to reproduce:

$ git clone https://github.com/meteor/todos.git
$ cd todos
$ npm install
$ meteor test --driver-package practicalmeteor:mocha

Tests run ok now. Now add audit-argument-checks:

$ meteor add audit-argument-checks
$ meteor test --driver-package practicalmeteor:mocha

Open http://localhost:3000/ server logs the following error:

Exception from sub mochaServerRunEvents id i2WrhfD2hE2itTBTc Error: Did not check() all arguments during publisher 'mochaServerRunEvents'
    at [object Object]._.extend.throwUnlessAllArgumentsHaveBeenChecked (packages/check.js:534:13)
    at Object.Match._failIfArgumentsAreNotAllChecked (packages/check.js:214:16)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1701:18)
    at Subscription._runHandler (packages/ddp-server/livedata_server.js:1026:17)
    at Session._startSubscription (packages/ddp-server/livedata_server.js:845:9)
    at Session.sub (packages/ddp-server/livedata_server.js:617:12)
    at packages/ddp-server/livedata_server.js:551:43
MochaRunner.runServerTests: Starting server side tests with run id FTkQZejRzZZkK26Mq
Exception while invoking method 'mocha/runServerTests' Error: Did not check() all arguments during call to 'mocha/runServerTests'
    at [object Object]._.extend.throwUnlessAllArgumentsHaveBeenChecked (packages/check.js:534:13)
    at Object.Match._failIfArgumentsAreNotAllChecked (packages/check.js:214:16)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1701:18)
    at packages/ddp-server/livedata_server.js:711:19
    at [object Object]._.extend.withValue (packages/meteor.js:1100:17)
    at packages/ddp-server/livedata_server.js:709:40
    at [object Object]._.extend.withValue (packages/meteor.js:1100:17)
    at packages/ddp-server/livedata_server.js:707:46
    at tryCallTwo (/Users/ronald/.meteor/packages/promise/.0.6.5.1wnwqt++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/ronald/.meteor/packages/promise/.0.6.5.1wnwqt++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:200:13)
tmeasday commented 8 years ago

Hey @orangewise,

Thanks for reporting this. We haven't yet made aac work with simple-schema: https://github.com/meteor/todos/issues/61

orangewise commented 8 years ago

@tmeasday, thanks for the feedback. I also have the issue in an app that doesn't use simple-schema...