@onebun/core 0.2.7 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onebun/core",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Core package for OneBun framework - decorators, DI, modules, controllers",
5
5
  "license": "LGPL-3.0",
6
6
  "author": "RemRyahirev",
@@ -1842,7 +1842,7 @@ describe('OneBunApplication', () => {
1842
1842
  expect(body.result.hasOptional).toBe(false);
1843
1843
  });
1844
1844
 
1845
- test('should return 500 when required query parameter is missing', async () => {
1845
+ test('should return 400 when required query parameter is missing', async () => {
1846
1846
  @Controller('/api')
1847
1847
  class ApiController extends BaseController {
1848
1848
  @Get('/required-query')
@@ -1869,7 +1869,7 @@ describe('OneBunApplication', () => {
1869
1869
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1870
1870
  const response = await (mockServer as any).fetchHandler(request);
1871
1871
 
1872
- expect(response.status).toBe(500);
1872
+ expect(response.status).toBe(400);
1873
1873
  });
1874
1874
 
1875
1875
  test('should pass validation with required query parameter present', async () => {
@@ -1966,7 +1966,7 @@ describe('OneBunApplication', () => {
1966
1966
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1967
1967
  const response = await (mockServer as any).fetchHandler(request);
1968
1968
 
1969
- expect(response.status).toBe(500);
1969
+ expect(response.status).toBe(400);
1970
1970
  });
1971
1971
 
1972
1972
  test('should validate body with arktype schema', async () => {
@@ -2045,7 +2045,7 @@ describe('OneBunApplication', () => {
2045
2045
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2046
2046
  const response = await (mockServer as any).fetchHandler(request);
2047
2047
 
2048
- expect(response.status).toBe(500);
2048
+ expect(response.status).toBe(400);
2049
2049
  });
2050
2050
 
2051
2051
  test('should handle metrics endpoint', async () => {
@@ -3449,7 +3449,7 @@ describe('OneBunApplication', () => {
3449
3449
  expect(body.result.isUndefined).toBe(true);
3450
3450
  });
3451
3451
 
3452
- test('should return 500 when required cookie is missing', async () => {
3452
+ test('should return 400 when required cookie is missing', async () => {
3453
3453
  @Controller('/api')
3454
3454
  class ApiController extends BaseController {
3455
3455
  @Get('/auth')
@@ -3474,7 +3474,7 @@ describe('OneBunApplication', () => {
3474
3474
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3475
3475
  const response = await (mockServer as any).fetchHandler(request);
3476
3476
 
3477
- expect(response.status).toBe(500);
3477
+ expect(response.status).toBe(400);
3478
3478
  });
3479
3479
 
3480
3480
  test('should extract multiple cookies with @Cookie decorator', async () => {