chore: wip #70
Annotations
2 errors
error: expect(received).toBe(expected):
test/dts.test.ts#L31
Expected: "import type { DtsGenerationOption, DtsGenerationConfig } from '@stacksjs/dtsx';\nimport type { BunPlugin } from 'bun';\nimport { generate } from '@stacksjs/dtsx';\n\n/**\n * Example of const declaration\n */\nexport declare const conf: { [key: string]: string };\n\nexport declare const someObject: {\n someString: 'Stacks';\n someNumber: 1000;\n someBoolean: true;\n someFalse: false;\n};\n\n/**\n * Example of interface declaration\n * with another comment in an extra line\n */\nexport declare interface User {\n id: number;\n name: string;\n email: string;\n}\n\n/**\n * Example of type declaration\n *\n * with multiple lines of comments, including an empty line\n */\nexport declare interface ResponseData {\n success: boolean;\n data: User[];\n}\n\n/**\n * Example of function declaration\n *\n *\n * with multiple empty lines, including an empty lines\n */\nexport declare function fetchUsers(): Promise<ResponseData>;\n\nexport declare interface ApiResponse<T> {\n status: number;\n message: string;\n data: T;\n}\n\n/**\n * Example of another const declaration\n *\n* with multiple empty lines, including being poorly formatted\n */\ndeclare const settings: {\n theme: 'dark';\n language: 'en';\n}\n\nexport declare interface Product {\n id: number;\n name: string;\n price: number;\n}\n\n/**\n * Example of function declaration\n */\nexport declare function getProduct(id: number): Promise<ApiResponse<Product>>;\n\nexport declare interface AuthResponse {\n token: string;\n expiresIn: number;\n}\n\nexport declare type AuthStatus = 'authenticated' | 'unauthenticated';\n\nexport declare function authenticate(user: string, password: string): Promise<AuthResponse>;\n\nexport declare const defaultHeaders: {\n 'Content-Type': string;\n};\n\nexport declare function dts(options?: DtsGenerationOption): BunPlugin;\n\ndeclare interface Options<T> {\n name: string;\n cwd?: string;\n defaultConfig: T;\n}\n\nexport declare function loadConfig<T extends Record<string, unknown>>(options: Options<T>): Promise<T>;\n\ndeclare const dtsConfig: DtsGenerationConfig;\n\nexport { generate, dtsConfig };\n\nexport type { DtsGenerationOption };\n\nexport { config } from './config';\nexport * from './extract';\nexport * from './generate';\nexport * from './types';\nexport * from './utils';\n\nexport default dts;\n"
Received: "import type { BunPlugin } from 'bun'\nimport process from 'node:process'\nimport { generate, deepMerge } from '@stacksjs/dtsx'\nimport type { DtsGenerationConfig, DtsGenerationOption } from '@stacksjs/dtsx'\nimport { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\n/**\n * Example of const declaration\n */\nexport declare const conf: { [key: string]: string };\n\nexport declare const someObject: {\n someString: 'Stacks';\n someNumber: 1000;\n someBoolean: true;\n someFalse: false;\n someFunction: () => { console.log('hello world') };\n\n someArray: [1, 2, 3];\n someObject: { key: 'value' };\n\n someNestedObject: {\n key: {\n nestedKey: 'value';\n}:;\n},: ;\n someNestedArray: [;\n [1, 2, 3],: ;\n [4, 5, 6],: ;\n ],: ;\n someNestedObjectArray: [;\n { key: 'value' };\n\n { key: 'value' };\n\n ],: ;\n someInlineCall: process.cwd();\n};\n\n/**\n * Example of interface declaration\n * with another comment in an extra line\n */\nexport declare interface User {\n id: number;\n name: string;\n email: string;\n}\n\n/**\n * Example of type declaration\n *\n * with multiple lines of comments, including an empty line\n */\nexport declare interface ResponseData {\n success: boolean;\n data: User[];\n}\n\n/**\n * Example of function declaration\n *\n *\n * with multiple empty lines, including an empty lines\n */\nexport declare function fetchUsers(): Promise<ResponseData>;\nexport declare interface ApiResponse<T> {\n status: number;\n message: string;\n data: T;\n}\n\n/**\n * Example of another const declaration\n *\n* with multiple empty lines, including being poorly formatted\n */\ndeclare const settings: { [key: string]: any };\n\nexport declare interface Product {\n
|
lint
Process completed with exit code 1.
|