thefrontside / bigtest

Ensure your React/Vue/Ember/anything app works perfectly across browsers.
https://frontside.com/bigtest
99 stars 14 forks source link

default tsconfig in BigTest expects `.ts` #959

Open jbolda opened 3 years ago

jbolda commented 3 years ago

If you init a project without Typescript, it is very likely you won't have / configure a tsconfig.json. The default config does not have "allowJs": true set, so it will fail. To alleviate the issue, I had to make a tsconfig.json including it such as below. It still does appear to run though?

You can produce by removing the bigtest.tsconfig.json, updating bigtest.json to remove that reference, and running the tests. (Note you need to yarn ntl build and npx serve public for the test.)

error

❯ yarn test
yarn run v1.22.10
$ bigtest ci -c bigtest.ci.json
[orchestrator] starting
[app] successfully connected to application!
rpt2: config error TS18003: No inputs were found in config file 'tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '[]'.
[connection] connected chrome.headless
[orchestrator] running!
[orchestrator] launch agents via: http://localhost:24001/__bigtest/index.html?connectTo=ws%3A%2F%2Flocalhost%3A24003
[orchestrator] show GraphQL dashboard via: http://localhost:28000
[manifest builder] build successful!
✓✓✓✓✓✓✓✓✓✓✓✓✓✓

────────────────────────────────────────────────────────────────────────────────
chrome.headless
Steps:      6 ok, 0 failed, 0 disregarded
Assertions: 8 ok, 0 failed, 0 disregarded
────────────────────────────────────────────────────────────────────────────────
✓ SUCCESS
[orchestrator] shutting down!
✨  Done in 10.55s.

created config

{
  "compilerOptions": {
    "allowJs": true,
    "skipLibCheck": true,
    "target": "es6",
    "lib": ["esnext", "dom"]
  }
}
cowboyd commented 3 years ago

We really ought to fix this, and I'm not sure what the options are. Are these some of them?

  1. try to generate a "pseudo tsconfig" if one is not present, and make sure it allows includes ".js" files?
  2. If there is no reference to to tsconfig.json in the bigtest config, then we don't include the rollup plugin at all?
dagda1 commented 3 years ago

@jbolda do you have an example repo that I can clone with this failing? I have an idea how to fix this.

jbolda commented 3 years ago

@dagda1 I think if you clone frontside.com and delete the bigtest.tsconfig.json you should be able to reproduce. I meant to say that in the OP but apparently missed it.

dagda1 commented 3 years ago

I've just tested this PR #961 and it seems to work

bigtest
dagda1 commented 3 years ago

and it was previously displaying the message