These are chat archives for canjs/canjs

18th
Oct 2017
Chasen Le Hara
@chasenlehara
Oct 18 2017 20:55
Hi @ivospinheiro, I think you’ve hit some bugs in can-fixture
It seems to me that 204 (without data) should work correctly.
Brad Momberger
@bmomberger-bitovi
Oct 18 2017 20:57
In your first example with the 200, you may also want to try return response(200, {data:{}}); instead
Chasen Le Hara
@chasenlehara
Oct 18 2017 20:57
Would you mind filing an issue about 204 not working here please? https://github.com/canjs/can-fixture/issues/new?labels=bug
Ivo Pinheiro
@ivospinheiro
Oct 18 2017 21:15
@chasenlehara it seems that the issue is not directly related with can-fixture.
It seems to be related with real-time behavior associated with the observation of each the todo items.
I've mounted a new example, and with this example the 3 different DELETE responses from the can-fixture are working fine.
Ivo Pinheiro
@ivospinheiro
Oct 18 2017 21:22
Here one example that is not working as expected:
https://jsbin.com/wivekuwuza/2/edit?html,js,console,output
In this example it expected a descendant counting from 3 to 0.
When showing each element items on the view it works fine:
https://jsbin.com/fatacuwera/1/edit?html,js,console,output
One other issue. The observation of the TodoList change is also not working as expected:
    todosMap.todos.on("length", function(){
      console.log("Length changed");
    });
Ivo Pinheiro
@ivospinheiro
Oct 18 2017 21:28
Is it possible on can-fixture response set only response http status, without defining the content?
Something similar to:
response(204);
@bmomberger-bitovi it seems that returning return response(200, {data:{}}); has the same result as return response(200, {});