Skip to content

Conversation

@spalger
Copy link
Contributor

@spalger spalger commented Mar 23, 2019

There are several improvements we'd like to make to expect.js, but the upstream repo is basically done. There are many open PRs and the last commit was in January 2015, so I think we should pull the library into our repo so we can tweak it.

Custom eslint/tslint rules are included to rewrite import expect from 'expect.js' to import expect from '@kbn/expect'.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@w33ble
Copy link
Contributor

w33ble commented Mar 25, 2019

Any consideration for moving to another assertion library that is supported? A codemod to replace expect.js with, say, chai, may not be super diffucult, and then we don't need a fork.

@spalger
Copy link
Contributor Author

spalger commented Mar 25, 2019

@w33ble I'm not saying we can't do that, but I think it would probably be more productive to go through and finish migrating all the existing tests to Jest.

Right now though I'm trying to collect assertion counts for the functional tests, which I don't think migrating to chai would help with.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@spalger spalger merged commit 2e232c2 into elastic:master Mar 25, 2019
spalger pushed a commit to spalger/kibana that referenced this pull request Mar 25, 2019
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
spalger pushed a commit to spalger/kibana that referenced this pull request Mar 25, 2019
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
spalger pushed a commit that referenced this pull request Mar 25, 2019
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
spalger pushed a commit that referenced this pull request Mar 25, 2019
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
@spalger
Copy link
Contributor Author

spalger commented Mar 25, 2019

7.x/7.1: 883ea31
7.0: 76cc216

@spalger spalger deleted the pull-in-expect.js branch March 25, 2019 20:14
joelgriffith pushed a commit that referenced this pull request Mar 27, 2019
* [@kbn/expect] "fork" expect.js into repo

* [eslint] autofix references to expect.js

* [tslint] autofix all expect.js imports

* now that expect.js is in strict mode, avoid reassigning fn.length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants