bigtest icon indicating copy to clipboard operation
bigtest copied to clipboard

default tsconfig in BigTest expects `.ts`

Open jbolda opened this issue 4 years ago • 5 comments

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"]
  }
}

jbolda avatar Jul 30 '21 16:07 jbolda

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?

cowboyd avatar Jul 31 '21 13:07 cowboyd

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

dagda1 avatar Jul 31 '21 14:07 dagda1

@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.

jbolda avatar Jul 31 '21 19:07 jbolda

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

bigtest

dagda1 avatar Aug 02 '21 14:08 dagda1

and it was previously displaying the message

dagda1 avatar Aug 02 '21 14:08 dagda1