A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/power-assert-js/power-assert/issues/32 below:

Cannot capture UpdateExpression like ++foo · Issue #32 · power-assert-js/power-assert · GitHub

class C {
  count_ = {};
  count() {
    return this.count_;
  }
}
var counter = new C();
assert(++counter.count_ === counter.count());

expected:

          assert(++counter.count_ === counter.count())
                 | |       |      |   |       |
                 | |       |      |   |       Object{}
                 | |       |      |   C{count_:#Object#}
                 | |       |      false
                 | |       Object{}
                 | C{count_:#Object#}
                 NaN

actual:

          assert(++counter.count_ === counter.count())
                 |                |   |       |
                 |                |   |       NaN
                 |                |   C{count_:NaN}
                 NaN              false

other:

          assert(+counter.count_ === counter.count())
                 ||       |      |   |       |
                 ||       |      |   |       Object{}
                 ||       |      |   C{count_:#Object#}
                 ||       |      false
                 ||       Object{}
                 |C{count_:#Object#}
                 NaN


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4