Skip to content

Conversation

HonzaKirchner
Copy link
Member

No description provided.

@B4nan
Copy link
Member

B4nan commented Sep 7, 2021

This one will need some changes in test assertions:

Summary of all failing tests
FAIL test/hubspot_client.test.ts (10.294 s)
  ● HubspotClient › _transformUser() › correctly transforms user data

    expect(received).toEqual(expected) // deep equality

    - Expected  - 0
    + Received  + 1

      Object {
        "apify_id__c": "TEST",
    +   "customer_segment": "",
        "segment_paying_user": "false",
        "subscription_plan": "",
        "subscription_price": 0,
      }

      160 |             };
      161 |             const transformedData = hubspotClient._transformUser(userData);
    > 162 |             expect(transformedData).toEqual(expectedData);
          |                                     ^
      163 |         });
      164 |         it('sets correct name if it\'s not provided when creating user and billing info is set', async () => {
      165 |             const userData = {

      at Object.<anonymous> (test/hubspot_client.test.ts:162:37)

  ● HubspotClient › _transformUser() › sets correct name if it's not provided when creating user and billing info is set

    expect(received).toEqual(expected) // deep equality

    - Expected  - 0
    + Received  + 1

    @@ -3,10 +3,11 @@
        "apify_id__c": "TEST",
        "billing_email__c": "",
        "city": "",
        "company": "",
        "country": "",
    +   "customer_segment": "",
        "eu_vat_number__c": "",
        "firstname": "Some Random",
        "lastname": "Name",
        "lifecyclestage": "customer",
        "segment_paying_user": "false",

      187 |             };
      188 |             const transformedData = hubspotClient._transformUser(userData, true);
    > 189 |             expect(transformedData).toEqual(expectedData);
          |                                     ^
      190 |         });
      191 |         it('sets placeholder name if it\'s not provided when creating user and billing info is not set', async () => {
      192 |             const userData = {

      at Object.<anonymous> (test/hubspot_client.test.ts:189:37)

  ● HubspotClient › _transformUser() › sets placeholder name if it's not provided when creating user and billing info is not set

    expect(received).toEqual(expected) // deep equality

    - Expected  - 0
    + Received  + 1

    @@ -1,7 +1,8 @@
      Object {
        "apify_id__c": "TEST",
    +   "customer_segment": "",
        "lastname": "[UNNAMED_CUSTOMER]",
        "lifecyclestage": "customer",
        "segment_paying_user": "false",
        "subscription_plan": "",
        "subscription_price": 0,

      202 |             };
      203 |             const transformedData = hubspotClient._transformUser(userData, true);
    > 204 |             expect(transformedData).toEqual(expectedData);
          |                                     ^
      205 |         });
      206 |     });
      207 |

      at Object.<anonymous> (test/hubspot_client.test.ts:204:37)

@HonzaKirchner
Copy link
Member Author

CleanShot 2021-09-14 at 10 16 26@2x

@B4nan B4nan merged commit f409367 into master Sep 14, 2021
@B4nan B4nan deleted the feature/hubspot-client-enhancement branch September 14, 2021 08:23
@HonzaKirchner HonzaKirchner restored the feature/hubspot-client-enhancement branch October 25, 2021 12:29
@fnesveda fnesveda deleted the feature/hubspot-client-enhancement branch October 5, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants