Skip to content

Update chai#1780

Merged
ricardograca merged 2 commits into
masterfrom
rg-update-chai
Mar 4, 2018
Merged

Update chai#1780
ricardograca merged 2 commits into
masterfrom
rg-update-chai

Conversation

@ricardograca

@ricardograca ricardograca commented Mar 4, 2018

Copy link
Copy Markdown
Member

Introduction

Update chai to a more recent version. This required a small change in one of the test helpers.

Motivation

David was showing it as outdated with a red semaphore and everything which made me sad 😢

Proposed solution

Unfortunately we can't update to the more recent version (4.1.2) due to a bug in that version that causes the wrong error to be reported when an expect() fails.

The countModels() test helper method had to be changed to do type coercion from string to number. This wasn't a problem before because chai did this coercion itself in the within, above, least, below, most, increase and decrease methods, but that changed with version 4.0.0.

Current PR Issues

Not the most recent version, but close enough.

- Note that there's currently a bug with the 4.1.x versions where a
failure in an expect will leak a variable to the global scope, causing
mocha to report that leak instead of the actual failure.
@ricardograca ricardograca changed the title Rg update chai Update chai Mar 4, 2018
@ricardograca ricardograca merged commit bc7d021 into master Mar 4, 2018
@ricardograca ricardograca deleted the rg-update-chai branch March 4, 2018 15:22
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.

1 participant