Skip to content

Tests failing #1

@Techwolf12

Description

@Techwolf12

Tests currently fail on a null vs empty string.

$ react-scripts test --env=jsdom --coverage --setupTestFrameworkScriptFile=./config/jest/setup.js
 FAIL  src/components/__tests__/CookieCompliancePopup.test.js
  ● CookieCompliancePopup component › should not render when consent has been agreed

    expect(received).toBe(expected)

    Expected value to be (using ===):
      null
    Received:
      ""

    Difference:

      Comparing two different types of values. Expected null but received string.

      at Object.it (src/components/__tests__/CookieCompliancePopup.test.js:103:30)
          at new Promise (<anonymous>)
      at Promise.resolve.then.el (node_modules/p-map/index.js:46:16)
      at process._tickCallback (internal/process/next_tick.js:68:7)

  ● CookieCompliancePopup component › should not render when consent has been disagreed

    expect(received).toBe(expected)

    Expected value to be (using ===):
      null
    Received:
      ""

    Difference:

      Comparing two different types of values. Expected null but received string.

      at Object.it (src/components/__tests__/CookieCompliancePopup.test.js:109:30)
          at new Promise (<anonymous>)
      at Promise.resolve.then.el (node_modules/p-map/index.js:46:16)
      at process._tickCallback (internal/process/next_tick.js:68:7)

 PASS  src/actions/__tests__/cookieCompliance.test.js
 PASS  src/reducers/__tests__/cookieCompliance.test.js

Test Suites: 1 failed, 2 passed, 3 total
Tests:       2 failed, 11 passed, 13 total

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions