ubiquity-os / ubiquity-os-kernel

1 stars 13 forks source link

feat: jest testing #29

Closed gentlementlegen closed 6 months ago

gentlementlegen commented 6 months ago

Resolves #26

github-actions[bot] commented 6 months ago
Coverage Report (0%) 
File% Stmts% Branch% Funcs% LinesUncovered Line #s
github-actions[bot] commented 6 months ago

Unused dependencies (4)

Filename dependencies
package.json @octokit/webhooks-types
create-cloudflare
octokit
universal-github-app-jwt

Unused devDependencies (6)

Filename devDependencies
package.json @mswjs/databr/>`@types/jest`<br/esbuild
eslint-config-prettier
eslint-plugin-prettier
ts-node

Unlisted dependencies (10)

Filename unlisted
src/github/github-client.ts @octokit/corebr/>`@octokit/types`<br/@octokit/plugin-paginate-restbr/>`@octokit/plugin-rest-endpoint-methods`<br/@octokit/plugin-retrybr/>`@octokit/plugin-throttling`<br/@octokit/auth-app
src/github/github-event-handler.ts @octokit/auth-app
src/github/utils/config.ts yaml
tests/main.test.ts @jest/globals

Unlisted binaries (4)

Filename binaries
package.json lsof
awk
.github/workflows/build.yml build
.github/workflows/cspell.yml format:cspell

Unused exports (1)

Filename exports
src/github/types/plugin.ts convertToString
0x4007 commented 6 months ago

Looks like there's a lot of conflicts. Please handle those.

gentlementlegen commented 6 months ago

Looks like there's a lot of conflicts. Please handle those.

Indeed. PR still on a draft though. We need to make a choice if we want to keep bun as the package manager? If so, I need to rewrite the tests, because at the moment its using Jest.

0x4007 commented 6 months ago

What do you want to do about the failing typecheck CI? If you can't find a way to work with Bun then we can switch back to yarn 1.x

This union type stuff is really complicated to deal with @whilefoo rfc

0x4007 commented 6 months ago

Unused dependencies (4)

Filename dependencies package.json @octokit/webhooks-types create-cloudflare octokit universal-github-app-jwt

Unused devDependencies (6)

Filename devDependencies package.json @mswjs/data @types/jest esbuild eslint-config-prettier eslint-plugin-prettier ts-node

Unlisted dependencies (10)

Filename unlisted src/github/github-client.ts @octokit/core @octokit/types @octokit/plugin-paginate-rest @octokit/plugin-rest-endpoint-methods @octokit/plugin-retry @octokit/plugin-throttling @octokit/auth-app src/github/github-event-handler.ts @octokit/auth-app src/github/utils/config.ts yaml tests/main.test.ts @jest/globals

Unlisted binaries (4)

Filename binaries package.json lsof awk .github/workflows/build.yml build .github/workflows/cspell.yml format:cspell

Unused exports (1)

Filename exports src/github/types/plugin.ts convertToString

I wonder if its too noisy to add this comment on every pull. I like how it was originally implemented, with inline warnings and errors on the file view instead. @gitcoindev perhaps you can look into logging all the errors in the form of annotations on the files view?

'convertToString' is an unused export is one of those, please address that.

gitcoindev commented 6 months ago

Unused dependencies (4)

Filename dependencies package.json @octokit/webhooks-types create-cloudflare octokit universal-github-app-jwt

Unused devDependencies (6)

Filename devDependencies package.json @mswjs/data @types/jest esbuild eslint-config-prettier eslint-plugin-prettier ts-node

Unlisted dependencies (10)

Filename unlisted src/github/github-client.ts @octokit/core @octokit/types @octokit/plugin-paginate-rest @octokit/plugin-rest-endpoint-methods @octokit/plugin-retry @octokit/plugin-throttling @octokit/auth-app src/github/github-event-handler.ts @octokit/auth-app src/github/utils/config.ts yaml tests/main.test.ts @jest/globals

Unlisted binaries (4)

Filename binaries package.json lsof awk .github/workflows/build.yml build .github/workflows/cspell.yml format:cspell

Unused exports (1)

Filename exports src/github/types/plugin.ts convertToString

I wonder if its too noisy to add this comment on every pull. I like how it was originally implemented, with inline warnings and errors on the file view instead. @gitcoindev perhaps you can look into logging all the errors in the form of annotations on the files view?

'convertToString' is an unused export is one of those, please address that.

I agree. I will have a look at configuration and try to change this into annotations only.

gentlementlegen commented 6 months ago

What do you want to do about the failing typecheck CI? If you can't find a way to work with Bun then we can switch back to yarn 1.x

This union type stuff is really complicated to deal with @whilefoo rfc

I looked into it. The 'bun:test' is a correct module but somehow I cannot get TypeScript to understand it. I read the docs, checked everything and it should work. Execution of the code also works fine, I am very confused of the reason why it complains. I might just silence the error there. https://bun.sh/docs/cli/test

0x4007 commented 6 months ago

Just the convertToString thing check the files view

gentlementlegen commented 6 months ago

Just the convertToString thing check the files view

I removed it but it seems Knip is still complaining about it somehow.

0x4007 commented 6 months ago

I'm not sure I guess we can gamble and merge.