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

Add upload-node maze runner tests #19

Merged
merged 5 commits into from
Nov 10, 2020

Conversation

imjoehaines
Copy link
Member

@imjoehaines imjoehaines commented Nov 6, 2020

Goal

This PR adds tests for the upload-node subcommand. These are mostly the same as the browser tests, because there aren't really an specific Node bundlers e.g. Next.js uses Webpack under the hood, but I did add a fixture that uses Babel's CLI to compile the same code against node & browser targets

Changeset

  • Split Buildkite pipeline into browser & node steps
  • Add source-map-babel fixture; this has 4 possible build options against old versions (so it does a lot of transformations):
    • single sourcemap node
    • multiple sourcemap node
    • single sourcemap browser
    • multiple sourcemap browser
  • Add copies of the upload-browser tests that run upload-node (main difference is node doesn't need a URL)
  • Add tests against the new source-map-babel fixture for node & browser

Copy link
Contributor

@bengourley bengourley left a comment

Choose a reason for hiding this comment

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

One note about minifiedUrl for Node to address.

Another thing it would be good to test at this level is missing sourcesContent from the source map. This applies to both Node and Browser.

If you configure TypeScript, Babel or Webpack to not include that in the source map that is created (e.g. with typescript this can be switched off with the inlineSources compiler option, or with webpack devtool: 'nosources-source-map') and then assert that the received source map contains sourcesContent that should suffice.

The sourcesContent stuff can be done as a follow-on and doesn't have to hold up this PR.

@imjoehaines imjoehaines merged commit 973a2cb into next Nov 10, 2020
@imjoehaines imjoehaines deleted the test/upload-node-maze-runner-tests branch November 10, 2020 14:14
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.

None yet

2 participants