Skip to content

Better tests (+ more hotfixes) - #2292

Merged
lukastaegert merged 3 commits into
masterfrom
better-tests
Jun 21, 2018
Merged

Better tests (+ more hotfixes)#2292
lukastaegert merged 3 commits into
masterfrom
better-tests

Conversation

@lukastaegert

@lukastaegert lukastaegert commented Jun 21, 2018

Copy link
Copy Markdown
Member

This improves our test setup and also fixes two issues that were uncovered while doing this.

  • This adds the "leak" test to our CI setup which would have uncovered this issue before the PR was merged: Provide the watcher on the plugin context #2261 (comment)
    Note that apparently "weak" only seems to work properly on Travis when installed manually as opposed to via package.json. I would suppose it is a caching issue.
  • This also adds a "build:bootstrap" script which uses the result of a previous "build" to build rollup again. On the CI, we now run this script and rollup's whole test-suite again after the normal test scripts have completed as a smoke test whether e.g. tree-shaking has removed some vital part of the logic. As it turned out, this immediately uncovered two bugs that were caused respectively revealed by the new undefined expression/property logic:
    1. When a namespace is passed to a function, all its members need to be reassigned as we lose track of this variable.
    2. The declarations in for-in and for-of statements are realized as variable declarations without initializers. The new logic now faultily assumed these variables were always "undefined".

@lukastaegert
lukastaegert requested a review from guybedford June 21, 2018 07:47
@lukastaegert
lukastaegert changed the base branch from master to do-not-deconflict-undefined June 21, 2018 07:49

@guybedford guybedford left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@lukastaegert

Copy link
Copy Markdown
Member Author

Thanks! You may also want to have a look at #2291 as well which this PR relies on so that I can hopefully do a patch release later today.

@lukastaegert
lukastaegert force-pushed the do-not-deconflict-undefined branch from 824332b to c498dd2 Compare June 21, 2018 10:11
@lukastaegert lukastaegert added this to the 0.61.1 milestone Jun 21, 2018
@lukastaegert
lukastaegert changed the base branch from do-not-deconflict-undefined to master June 21, 2018 11:16
@lukastaegert
lukastaegert merged commit 8e7cf6b into master Jun 21, 2018
@lukastaegert
lukastaegert deleted the better-tests branch June 21, 2018 11:19
calebeby referenced this pull request in Pigmice2733/scouting-frontend Jun 21, 2018
This Pull Request updates dependency [rollup](https://github.com/rollup/rollup) from `v0.60.7` to `v0.61.1`



<details>
<summary>Release Notes</summary>

### [`v0.61.1`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#&#8203;0611)
[Compare Source](rollup/rollup@v0.61.0...697f36d)
*2018-06-21*
* Do not try to deconflict "undefined" ([#&#8203;2291](`https://github.com/rollup/rollup/pull/2291`))
* Properly track values for loop interator declarations and reassigned namespaces, add smoke test ([#&#8203;2292](`https://github.com/rollup/rollup/pull/2292`))

---

### [`v0.61.0`](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#&#8203;0610)
[Compare Source](rollup/rollup@v0.60.7...v0.61.0)
*2018-06-20*
* Declare file dependencies via transform plugin hooks ([#&#8203;2259](`https://github.com/rollup/rollup/pull/2259`))
* Handle undefined values when evaluating conditionals ([#&#8203;2264](`https://github.com/rollup/rollup/pull/2264`))
* Handle known undefined properties when evaluating conditionals ([#&#8203;2265](`https://github.com/rollup/rollup/pull/2265`))
* Access watch events via the plugin context ([#&#8203;2261](`https://github.com/rollup/rollup/pull/2261`))
* Add option to suppress `__esModule` flag in output ([#&#8203;2287](`https://github.com/rollup/rollup/pull/2287`))
* Fix issue when re-declaring variables, track reassignments in more cases ([#&#8203;2279](`https://github.com/rollup/rollup/pull/2279`))
* Add VSCode debug settings ([#&#8203;2276](`https://github.com/rollup/rollup/pull/2276`))

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).
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.

2 participants