Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nestia can not run test in Bun #1144

Open
xiaocode opened this issue Dec 10, 2024 · 3 comments
Open

Nestia can not run test in Bun #1144

xiaocode opened this issue Dec 10, 2024 · 3 comments
Assignees
Labels
invalid This doesn't seem right question Further information is requested wontfix This will not be worked on

Comments

@xiaocode
Copy link

Bug Report

Unhandled error between tests


1 | "use strict";
2 | Object.defineProperty(exports, "__esModule", { value: true });
3 | exports.NoTransformConfigurationError = NoTransformConfigurationError;
4 | function NoTransformConfigurationError(method) {
5 | if (NoTransformConfigurationError.throws === true)
6 | throw new Error([
^
error: Error on nestia.core.TypedRoute.Post(): no transform has been configured. Run "npx typia setup" command, or check if you're using non-standard TypeScript compiler like Babel or SWC. Otherwise you're running "npx nestia sdk/swagger" or similar, run "npx tsc" command to find the reason why.

`bun test test/*.test.ts`

and "bunx tsc" is OK!

Summary

Write a short summary of the bug in here.

  • Expected behavior: test passed
  • Actual behavior:

Write detailed description in here.

"@nestia/core": "^4.1.0",
"@nestia/e2e": "^0.7.0",
"@nestia/fetcher": "^4.1.0",
"@nestia/sdk": "^4.1.0",
"@nestjs/common": "^10.0.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/platform-socket.io": "^10.4.15",
"@nestjs/websockets": "^10.4.15",
"drizzle-orm": "^0.38.0",
"jsonwebtoken": "^9.0.2",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
"typia": "^7.2.0",
"zod": "^3.23.8"
@samchon samchon self-assigned this Dec 10, 2024
@samchon samchon added invalid This doesn't seem right question Further information is requested wontfix This will not be worked on labels Dec 10, 2024
@samchon
Copy link
Owner

samchon commented Dec 10, 2024

Compile TypeScript code first and run it later.

@xiaocode
Copy link
Author

$ tsc -p tsconfig.test.json
src/database/index.ts:3:26 - error TS2307: Cannot find module 'bun:sqlite' or its corresponding type declarations.

3 import { Database } from 'bun:sqlite';
~~~~~~~~~~~~

test/products.test.ts:1:61 - error TS2307: Cannot find module 'bun:test' or its corresponding type declarations.

1 import { describe, expect, test, beforeAll, afterAll } from 'bun:test';
~~~~~~~~~~

Found 2 errors in 2 files.

@samchon
Copy link
Owner

samchon commented Dec 10, 2024

Your code occurs compilation errors, and I can't solve them instead of you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants