Yes
Yes
node -v
: v8.6.0npm -v
: 5.3.0yarn --version
(if you use Yarn): 1.3.2npm ls react-scripts
(if you haven鈥檛 ejected): 1.0.12Then, specify:
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".
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')
You do not allow to override the "testURL" property inside the package.json.
/cc @gaearon what do you think about this?
I think we should fix it.. somehow :-)
What are our options?
Should we set a default testURL
based on homepage
?
Sounds reasonable to me
+1 for this fix. There is a strange thing: BrowserRouter doesn't fire such warning. But I need Router...
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"
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"
Thanks!!!! I've been looking everywhere for a way to change this configuration without having to extract create-react-app!
Most helpful comment
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"