tc39 / proposal-observable

Observables for ECMAScript
https://tc39.github.io/proposal-observable/
3.06k stars 90 forks source link

Invalid test based on Interface. #193

Open tbremer opened 6 years ago

tbremer commented 6 years ago

In the Function arguments suite there is a test that requires the complete callback to take a value (https://github.com/tc39/proposal-observable/blob/master/test/subscribe.js#L41), however, the Observer interface does not specify it should take a value.

interface Observer {

    // Receives the subscription object when `subscribe` is called
    start(subscription : Subscription);

    // Receives the next value in the sequence
    next(value);

    // Receives the sequence error
    error(errorValue);

    // Receives a completion notification
    complete();
}

Moreover, the body of the Specification also indicates that it should not take a value (https://tc39.github.io/proposal-observable/#subscription-observer-prototype-complete).

So, what is valid? The test or the specification? Also, can we update the incorrect instances?

benjamingr commented 6 years ago

The test is outdated and needs a fix