Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of defineSuite #8120

Merged
merged 1 commit into from
Sep 5, 2019
Merged

Get rid of defineSuite #8120

merged 1 commit into from
Sep 5, 2019

Conversation

mramato
Copy link
Contributor

@mramato mramato commented Aug 31, 2019

Cesium traditionally had a custom defineSuite function that wrapped both the define used for importing requrejs modules and the describe used to define a jasmine test block.

In order to move to ES6, we need to get rid of this helper function and just use separatedefine/describe calls. Then, when we move to ES6, the describe calls will stay as-is and the define call will be replaced with ES6 module imports.

Since we also overloaded describe calls for category support, this was an easy change to make and has zero functional changes.

To make the diff easy, I left indentation as-is. When we move to ES6, the indentation will actually go back to being correct.

This is a test-only change.

Cesium traditionally had a custom `defineSuite` function that wrapped
both the `define` used for importing requrejs modules and the `describe`
used to define a jasmine test block.

In order to move to ES6, we need to get rid of this helper function and
just use separate`define`/`describe` calls. Then, when we move to ES6,
the describe calls will stay as-is and the define call will be replaced
with ES6 module imports.

Since we also overloaded describe calls for category support, this was
an easy change to make and has zero functional changes.

To make the diff easy, I left indentation as-is.  When we move to ES6,
the indentation will actually go back to being correct.
@cesium-concierge
Copy link

Thanks for the pull request @mramato!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@mramato mramato mentioned this pull request Sep 2, 2019
17 tasks
@mramato
Copy link
Contributor Author

mramato commented Sep 3, 2019

Bump. Now that the release is out, it would be a good time to get this merged.

CC @OmarShehata

@OmarShehata
Copy link
Contributor

I was hoping to see two separate commits, one for the codebase-wide find all and replace, and one for the non-automated changes like the docs, spec-main.js and customizeJasmine.js to make it easier to review - but this seems to work pretty well.

Was there anything else the custom defineSuite did other than allow us to avoid having to write the name of the file twice in each spec?

@mramato
Copy link
Contributor Author

mramato commented Sep 5, 2019

Was there anything else the custom defineSuite did other than allow us to avoid having to write the name of the file twice in each spec?

Nope. (Technically yes it had a second parameter that was a category, but it also did this for descrive already so it's zero functionality change).

@mramato
Copy link
Contributor Author

mramato commented Sep 5, 2019

spec-main.js and customizeJasmine.js to make it easier to review - but this seems to work pretty well.

Also, there were no "changes" in this files per-se, it was just straight up delete the function. The diff is really not bad at all.

@OmarShehata
Copy link
Contributor

Also, there were no "changes" in this files per-se, it was just straight up delete the function. The diff is really not bad at all.

It was more just that it was hard to find which files had these deletions among all the find-and-replace spec files.

@OmarShehata OmarShehata merged commit fca7235 into master Sep 5, 2019
@OmarShehata OmarShehata deleted the jazzy branch September 5, 2019 14:43
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