question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported key testURL causes troubles for (non-root) sub applications.

See original GitHub issue

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Yes

Which terms did you search for in User Guide?

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#configuration

Environment

  1. node -v: v8.6.0
  2. npm -v: 5.3.0
  3. yarn --version (if you use Yarn): 1.3.2
  4. npm ls react-scripts (if you haven’t ejected): 1.0.12

Then, specify:

  1. Operating system: Ubuntu 16.04.3 LTS xenial

Steps to Reproduce

  1. Use react-router “Router” with history “createBrowserHistory” where supplied some basename-Property because you would like to deploy your application under a specific path. E.g.: “/app”
  2. Run the Tests like recommended “react-scripts test --env=jsdom”
  3. You will see a bunch warning logs like:
Warning: You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "/" to begin with "/app".

Expected Behavior

I would expect that your “createJestConfig” allows also to override “testURL” property. Then I could override your static value “http://localhost” with “http://localhost/app” to resolve my problem. I do not want to eject and had to patch your “createJestConfig” by one line:

supportedKeys.push('testURL')

Actual Behavior

You do not allow to override the “testURL” property inside the package.json.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

10reactions
dfedericocommented, Dec 17, 2018

I was able to get around this by just adding --testURL http://localhost/{variable} into my test script in package.json,

ie:

“test”: “react-scripts-ts test --env=jsdom --watch --testURL http://localhost/foo

9reactions
Timercommented, Jan 9, 2018

Should we set a default testURL based on homepage?

Read more comments on GitHub >

github_iconTop Results From Across the Web

testlink 10.0.16 · bitnami/bitnami - Artifact Hub
DEPRECATED TestLink is test management software that facilitates software quality assurance. It suppors test cases, test suites, test plans, test projects ...
Read more >
pytest Documentation - Read the Docs
The first test passed and the second failed. You can easily see the intermediate values in the assertion to help you under- stand...
Read more >
Supplemental Document: BIG-IP 13.1.3 Fixes and Known Issues
Impact: Not able to modify SSL profile certificate key chain from iApp. Failure error message is reported on iApp and in ltm log....
Read more >
Changelog - Cypress Documentation
Cypress will now warn when detecting unsupported dependencies for component testing. Fixes #22025. cy.type() can now be used to enter datetime values with ......
Read more >
EJBCA Change Log Summary - PrimeKey Documentation
EJBCA 7.3.0. Released October 2019. New Features. ECA-7278 - Initial support for Azure Key Vault as EJBCA Crypto Token. ECA- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found