0

I see a lot of examples (including ember-cli generated tests) that use assert.function() but I can use the function as is, so am I doing something wrong, or do examples just show not-really-necessary qualifiers?

For example, either of these work in a new generated unit test:

assert.expect(1);

expect(1);

Why ever do the first one if the second one works?

4

1 に答える 1

2

これは実際にはQUnit の変更であり、Ember の変更ではありません。QUnit は 2.0 に向けて API を変更しています。現在グローバル バージョンを使用できますが、2.0 で削除されるため、assert.*後でコードを変更する必要がないように、今すぐバージョンを使用することをお勧めします。

于 2015-06-30T19:47:50.910 に答える