Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-781

Failure in UserListeningActivity.test.tsx due to new year

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • None

      I'm seeing a test failure in js tests:

       

        ● processData › processes data correctly for all_time
      
          expect(received).toEqual(expected) // deep equality
      
          - Expected  - 0
          + Received  + 5
      
          @@ -92,6 +92,11 @@
              Object {
                "id": "2020",
                "thisRangeCount": 3580,
                "thisRangeTs": 1577836800,
              },
          +   Object {
          +     "id": "2021",
          +     "thisRangeCount": 0,
          +     "thisRangeTs": 1609459200,
          +   },
            ]
      
            278 |     );
            279 | 
          > 280 |     expect(result).toEqual(userListeningActivityProcessedDataAllTime);
                |                    ^
            281 |   });
            282 | });
            283 | 
      
            at Object.<anonymous> (static/js/src/stats/UserListeningActivity.test.tsx:280:20)
      

      It looks like this object now has an entry for 2021 now that we're in a new year. Ideally this test should be configured so that its output doesn't change when the year changes.

            ishaanshah Ishaan Shah
            alastairp Alastair Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package