futil-js / contexture-core

Contexture DSL Processor
MIT License
21 stars 1 forks source link

Changed the way error are handled #57

Open rudolph9 opened 3 years ago

rudolph9 commented 3 years ago

Return the raw error so errors can be handled on a per node basis

related https://github.com/smartprocure/contexture-elasticsearch/pull/167

decrapifier commented 3 years ago
Fails
:no_entry_sign: This PR has failing tests. Please alleviate the errors and commit them
lastCalendarMonth expected { Object (totalRecords, results) } to deeply equal { Object (results, totalRecords) }
Warnings
:warning: Branch being merged does not follow [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/)
:warning: The README has not been updated. Please update the README.
Messages
:book: You reduced the total lines of code! Awesome! :+1:
:book: Could not find any browser results.

Generated by :no_entry_sign: dangerJS against 37b972f1dbfa6e2f7edbb94c23949177157fd5a2

rudolph9 commented 3 years ago

This test was failing before any changes were made, fixing now

  1) Date example type test cases lastCalendarMonth:

      AssertionError: expected { Object (totalRecords, results) } to deeply equal { Object (results, totalRecords) }
      + expected - actual

           {
             "date": "2021-02-26T12:53:49-05:00"
             "key": "lastMonth"
           }
      +    {
      +      "date": "2021-03-23T12:53:49-04:00"
      +      "key": "last3Days"
      +    }
      +    {
      +      "date": "2021-03-20T12:53:49-04:00"
      +      "key": "last6Days"
      +    }
      +    {
      +      "date": "2021-03-06T12:53:49-05:00"
      +      "key": "last20Days"
      +    }
         ]
      -  "totalRecords": 1
      +  "totalRecords": 4
       }

      at testRange (test/date.js:133:48)  1) Date example type test cases lastCalendarMonth:

      AssertionError: expected { Object (totalRecords, results) } to deeply equal { Object (results, totalRecords) }
      + expected - actual

           {
             "date": "2021-02-26T12:53:49-05:00"
             "key": "lastMonth"
           }
      +    {
      +      "date": "2021-03-23T12:53:49-04:00"
      +      "key": "last3Days"
      +    }
      +    {
      +      "date": "2021-03-20T12:53:49-04:00"
      +      "key": "last6Days"
      +    }
      +    {
      +      "date": "2021-03-06T12:53:49-05:00"
      +      "key": "last20Days"
      +    }
         ]
      -  "totalRecords": 1
      +  "totalRecords": 4
       }

      at testRange (test/date.js:133:48)

related: https://github.com/smartprocure/contexture/pull/54/files

rudolph9 commented 3 years ago

the tests are fixed by https://github.com/smartprocure/contexture/pull/58

rudolph9 commented 1 year ago

closing, this is old and I don't think needed anymore