Skip to content

Conversation

dstallenberg
Copy link
Contributor

@dstallenberg dstallenberg commented Sep 19, 2023

  • Created assertion data object such that we do not have to rely on logs to file anymore
  • Used the context builder to create better variable names
  • Enable assertions again
  • Replace try catch for exceptions by proper "rejectedWith" function from chai

I also found a bug:
The require function caches contents of files. So when we require a "constant object" from a file multiple times we are actually using the same instance. During the search process this is no problem since all tests are ran in isolation. However, the final test suite puts all the tests in the same file so the results where not consistent.

I fixed this by removing cached files in the beforeEach method of mocha.

@dstallenberg dstallenberg marked this pull request as ready for review September 19, 2023 09:17
@dstallenberg dstallenberg requested a review from a team as a code owner September 19, 2023 09:17
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 6233593179

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 46.885%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/analysis-javascript/lib/type/discovery/element/ElementVisitor.ts 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
libraries/analysis-javascript/lib/type/discovery/element/ElementVisitor.ts 1 73.26%
Totals Coverage Status
Change from base Build 6191837316: -0.1%
Covered Lines: 1504
Relevant Lines: 2963

💛 - Coveralls

@dstallenberg dstallenberg merged commit 2c981c9 into main Sep 19, 2023
@dstallenberg dstallenberg deleted the feat-improved-testcase-readability branch September 19, 2023 12:18
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