Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-56

Mock http requests made using fetch

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.0
    • Component/s: Core
    • Tags:
    • Sprint:
      nxNag Sprint 8.2.1

      Description

      We currently rely on sinonJS to mock responses on our tests, but it doesn't support the new fetch API, which means we need to force the fetch API to use the polyfill

      <script>
         window.fetch = null;
      </script>
      

      Tests where we force the polyfill:

      • nuxeo-connection
      • nuxeo-document
      • nuxeo-operation
      • nuxeo-resource
      • nuxeo-document-distribution-chart
      • tests in dataviz repo

      Possible solutions:
      https://www.npmjs.com/package/fetch-mock

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: