Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #4

Closed
p-a-s-c-a-l opened this issue Aug 28, 2019 · 8 comments
Closed

Add tests #4

p-a-s-c-a-l opened this issue Aug 28, 2019 · 8 comments
Assignees
Labels
BB: Development Platform Integration and Development Platform Building Block BB: Table Component Table Component Building Block enhancement New feature or request

Comments

@p-a-s-c-a-l
Copy link
Member

add some tests

@p-a-s-c-a-l p-a-s-c-a-l added the enhancement New feature or request label Aug 28, 2019
@p-a-s-c-a-l p-a-s-c-a-l self-assigned this Aug 28, 2019
p-a-s-c-a-l added a commit that referenced this issue Aug 28, 2019
@p-a-s-c-a-l
Copy link
Member Author

done

@p-a-s-c-a-l p-a-s-c-a-l added BB: Development Platform Integration and Development Platform Building Block BB: Table Component Table Component Building Block labels Oct 28, 2019
@p-a-s-c-a-l
Copy link
Member Author

TypeError: resource.relationships.field_references.data.flatMap is not a function

  291 |                     resource.relationships.field_references.data.length > 0
  292 |             ) {
> 293 |                     references = resource.relationships.field_references.data.flatMap((referenceReference) => {
      |                                  ^
  294 |                             let filteredReferences = referencesArray.filter((referenceObject) => {
  295 |                                     return (
  296 |                                             referenceReference.type === referenceObject.type &&

  at Object.extractReferencesfromResource (../csis-helpers-js/src/lib/CSISHelpers.js:293:17)
  at Object.extractReferencesfromResource (src/__tests__/CSISHelpers.test.js:111:36)

@p-a-s-c-a-l
Copy link
Member Author

flatMap isn't supported by Node.js < version 10

@p-a-s-c-a-l
Copy link
Member Author

Consider using react-app-polyfill instead of installing the lasted node version (also on CI!) as explained here.

@p-a-s-c-a-l
Copy link
Member Author

Error: Cross origin http://localhost forbidden

@p-a-s-c-a-l
Copy link
Member Author

Solution:
axios.defaults.adapter = require('axios/lib/adapters/http');

p-a-s-c-a-l added a commit that referenced this issue Mar 25, 2020
@p-a-s-c-a-l
Copy link
Member Author

done

@p-a-s-c-a-l
Copy link
Member Author

Tests broke with absolutely unhelpful error message:

  ●  Cannot log after tests are done. Did you forget to wait for something async in your test?
    Attempted to log "error caught in fetchData Error: connect EACCES 192.168.178.28:8118
        at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BB: Development Platform Integration and Development Platform Building Block BB: Table Component Table Component Building Block enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant