console.log 'before'
assert 1 is 2
console.log 'after'

When I run meteor, all that is printed is 'before', and nothing about an assertion failing. The assert package has been added with meteor add assert.

有帮助吗?

解决方案

Try this (looks like you're using coffeescript):

console.log 'before'

try
  assert 1 is 2
catch error
  console.log error.message

console.log 'after'
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top