@neurodevs/node-tdd 1.0.6 → 1.0.7
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 +1 -1
- package/.nvmrc +0 -1
- package/.vscode/launch.json +0 -53
- package/.vscode/settings.json +0 -62
- package/.vscode/tasks.json +0 -99
- package/build/__tests__/MockFetch.d.ts +0 -18
- package/build/__tests__/MockFetch.js +0 -55
- package/build/__tests__/MockFetch.js.map +0 -1
- package/build/__tests__/behavioral/AbstractModuleTest.test.d.ts +0 -5
- package/build/__tests__/behavioral/AbstractModuleTest.test.js +0 -22
- package/build/__tests__/behavioral/AbstractModuleTest.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.d.ts +0 -5
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js +0 -34
- package/build/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/Assert.test.d.ts +0 -45
- package/build/__tests__/behavioral/utilities/Assert.test.js +0 -645
- package/build/__tests__/behavioral/utilities/Assert.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js +0 -23
- package/build/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/MockFetch.test.d.ts +0 -28
- package/build/__tests__/behavioral/utilities/MockFetch.test.js +0 -211
- package/build/__tests__/behavioral/utilities/MockFetch.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/StackCleaner.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/StackCleaner.test.js +0 -46
- package/build/__tests__/behavioral/utilities/StackCleaner.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.d.ts +0 -7
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js +0 -32
- package/build/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js +0 -19
- package/build/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/Stringify.test.d.ts +0 -5
- package/build/__tests__/behavioral/utilities/Stringify.test.js +0 -127
- package/build/__tests__/behavioral/utilities/Stringify.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.d.ts +0 -7
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js +0 -38
- package/build/__tests__/behavioral/utilities/TestDecoratorResolver.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.d.ts +0 -12
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.js +0 -68
- package/build/__tests__/behavioral/utilities/TestOnBasic.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.d.ts +0 -28
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.js +0 -289
- package/build/__tests__/behavioral/utilities/TestOnInstance.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.d.ts +0 -9
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js +0 -118
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.d.ts +0 -5
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js +0 -78
- package/build/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js +0 -23
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js +0 -24
- package/build/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestResolver.test.d.ts +0 -7
- package/build/__tests__/behavioral/utilities/TestResolver.test.js +0 -38
- package/build/__tests__/behavioral/utilities/TestResolver.test.js.map +0 -1
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.d.ts +0 -4
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js +0 -20
- package/build/__tests__/behavioral/utilities/TestResolverOnStatic.test.js.map +0 -1
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.d.ts +0 -18
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.js +0 -267
- package/build/__tests__/behavioral/workspace/JestJsonParser.test.js.map +0 -1
- package/build/__tests__/behavioral/workspace/TestReporter.test.d.ts +0 -27
- package/build/__tests__/behavioral/workspace/TestReporter.test.js +0 -508
- package/build/__tests__/behavioral/workspace/TestReporter.test.js.map +0 -1
- package/build/__tests__/behavioral/workspace/TestRunner.test.d.ts +0 -15
- package/build/__tests__/behavioral/workspace/TestRunner.test.js +0 -99
- package/build/__tests__/behavioral/workspace/TestRunner.test.js.map +0 -1
- package/build/__tests__/behavioral/workspace/Widgets.test.d.ts +0 -16
- package/build/__tests__/behavioral/workspace/Widgets.test.js +0 -134
- package/build/__tests__/behavioral/workspace/Widgets.test.js.map +0 -1
- package/build/__tests__/mock-terminal-kit.d.ts +0 -79
- package/build/__tests__/mock-terminal-kit.js +0 -103
- package/build/__tests__/mock-terminal-kit.js.map +0 -1
- package/build/__tests__/support/AbstractForInstanceTest.d.ts +0 -4
- package/build/__tests__/support/AbstractForInstanceTest.js +0 -9
- package/build/__tests__/support/AbstractForInstanceTest.js.map +0 -1
- package/build/__tests__/support/AbstractLevelOneTest.d.ts +0 -3
- package/build/__tests__/support/AbstractLevelOneTest.js +0 -4
- package/build/__tests__/support/AbstractLevelOneTest.js.map +0 -1
- package/build/__tests__/support/AbstractLevelTwoTest.d.ts +0 -7
- package/build/__tests__/support/AbstractLevelTwoTest.js +0 -14
- package/build/__tests__/support/AbstractLevelTwoTest.js.map +0 -1
- package/build/__tests__/support/AbstractStaticTest.d.ts +0 -7
- package/build/__tests__/support/AbstractStaticTest.js +0 -14
- package/build/__tests__/support/AbstractStaticTest.js.map +0 -1
- package/build/__tests__/support/AbstractTestOnInstanceTest.d.ts +0 -22
- package/build/__tests__/support/AbstractTestOnInstanceTest.js +0 -23
- package/build/__tests__/support/AbstractTestOnInstanceTest.js.map +0 -1
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.d.ts +0 -26
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js +0 -59
- package/build/__tests__/support/AbstractTestOnInstanceWithHooks.js.map +0 -1
- package/build/__tests__/support/jest.setup.d.ts +0 -1
- package/build/__tests__/support/jest.setup.js +0 -4
- package/build/__tests__/support/jest.setup.js.map +0 -1
- package/build/__tests__/support/onTestFileResult.d.ts +0 -244
- package/build/__tests__/support/onTestFileResult.js +0 -980
- package/build/__tests__/support/onTestFileResult.js.map +0 -1
- package/eslint.config.js +0 -3
- package/prettier.config.js +0 -3
- package/src/.spruce/settings.json +0 -4
- package/src/__tests__/MockFetch.ts +0 -100
- package/src/__tests__/behavioral/AbstractModuleTest.test.ts +0 -15
- package/src/__tests__/behavioral/utilities/AllHooksCalledEvenIfNotDefined.test.ts +0 -31
- package/src/__tests__/behavioral/utilities/Assert.test.ts +0 -826
- package/src/__tests__/behavioral/utilities/InstanceParentTestCanAccessParentMethods.test.ts +0 -14
- package/src/__tests__/behavioral/utilities/MockFetch.test.ts +0 -240
- package/src/__tests__/behavioral/utilities/StackCleaner.test.ts +0 -46
- package/src/__tests__/behavioral/utilities/StaticParentTestCanAccessParentMethods.test.ts +0 -34
- package/src/__tests__/behavioral/utilities/StaticTestInheritsAbstractSpruceTestProperly.test.ts +0 -11
- package/src/__tests__/behavioral/utilities/Stringify.test.ts +0 -169
- package/src/__tests__/behavioral/utilities/TestDecoratorResolver.test.ts +0 -51
- package/src/__tests__/behavioral/utilities/TestOnBasic.test.ts +0 -62
- package/src/__tests__/behavioral/utilities/TestOnInstance.test.ts +0 -439
- package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTest.test.ts +0 -237
- package/src/__tests__/behavioral/utilities/TestOnInstanceExtendsTestWithHooks.test.ts +0 -85
- package/src/__tests__/behavioral/utilities/TestOnInstanceWithParentBeforeAll.test.ts +0 -14
- package/src/__tests__/behavioral/utilities/TestOnInstanceWithTwoLevelsOfInheritence.test.ts +0 -16
- package/src/__tests__/behavioral/utilities/TestResolver.test.ts +0 -48
- package/src/__tests__/behavioral/utilities/TestResolverOnStatic.test.ts +0 -12
- package/src/__tests__/behavioral/workspace/JestJsonParser.test.ts +0 -357
- package/src/__tests__/behavioral/workspace/TestReporter.test.ts +0 -584
- package/src/__tests__/behavioral/workspace/TestRunner.test.ts +0 -87
- package/src/__tests__/behavioral/workspace/Widgets.test.ts +0 -131
- package/src/__tests__/mock-terminal-kit.ts +0 -115
- package/src/__tests__/support/AbstractForInstanceTest.ts +0 -12
- package/src/__tests__/support/AbstractLevelOneTest.ts +0 -3
- package/src/__tests__/support/AbstractLevelTwoTest.ts +0 -16
- package/src/__tests__/support/AbstractStaticTest.ts +0 -16
- package/src/__tests__/support/AbstractTestOnInstanceTest.ts +0 -30
- package/src/__tests__/support/AbstractTestOnInstanceWithHooks.ts +0 -138
- package/src/__tests__/support/jest.setup.ts +0 -2
- package/src/__tests__/support/onTestFileResult.ts +0 -1008
- package/src/impl/AbstractModuleTest.ts +0 -67
- package/src/index.ts +0 -12
- package/src/utilities/AssertionError.ts +0 -14
- package/src/utilities/StackCleaner.ts +0 -14
- package/src/utilities/TestDecoratorResolver.ts +0 -118
- package/src/utilities/assert.ts +0 -583
- package/src/utilities/assert.utility.ts +0 -295
- package/src/utilities/decorators.ts +0 -167
- package/src/workspace/CommandService.ts +0 -256
- package/src/workspace/JestJsonParser.ts +0 -255
- package/src/workspace/TKButtonWidget.ts +0 -54
- package/src/workspace/TestLogItemGenerator.ts +0 -184
- package/src/workspace/TestReporter.ts +0 -880
- package/src/workspace/TestRunner.ts +0 -128
- package/src/workspace/TkBaseWidget.ts +0 -249
- package/src/workspace/TkInputWidget.ts +0 -83
- package/src/workspace/TkLayoutCellWidget.ts +0 -46
- package/src/workspace/TkLayoutWidget.ts +0 -181
- package/src/workspace/TkMenuBarWidget.ts +0 -95
- package/src/workspace/TkPopupWidget.ts +0 -47
- package/src/workspace/TkProgressBarWidget.ts +0 -54
- package/src/workspace/TkTextWidget.ts +0 -167
- package/src/workspace/TkWindowWidget.ts +0 -122
- package/src/workspace/WidgetFactory.ts +0 -33
- package/src/workspace/button.types.ts +0 -19
- package/src/workspace/duration.utility.ts +0 -34
- package/src/workspace/factory.types.ts +0 -101
- package/src/workspace/input.types.ts +0 -22
- package/src/workspace/keySelectChoices.ts +0 -134
- package/src/workspace/layout.types.ts +0 -40
- package/src/workspace/menuBar.types.ts +0 -24
- package/src/workspace/popup.types.ts +0 -17
- package/src/workspace/progressBar.types.ts +0 -13
- package/src/workspace/table.types.ts +0 -9
- package/src/workspace/termKit.utility.ts +0 -130
- package/src/workspace/terminal-kit.d.ts +0 -28
- package/src/workspace/test.types.ts +0 -34
- package/src/workspace/testRunner.cli.ts +0 -166
- package/src/workspace/text.types.ts +0 -27
- package/src/workspace/widget.utilities.ts +0 -35
- package/src/workspace/widgets.types.ts +0 -102
- package/src/workspace/window.types.ts +0 -22
- package/tsconfig.json +0 -24
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events'
|
|
2
|
-
|
|
3
|
-
export interface EventSignatureMap {
|
|
4
|
-
[eventName: string]: {
|
|
5
|
-
emitPayloadSchema?: any
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface EventContract {
|
|
10
|
-
eventSignatures: EventSignatureMap
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type MercuryEventEmitter<Contract extends EventContract = any> =
|
|
14
|
-
EventEmitter & {
|
|
15
|
-
emit(
|
|
16
|
-
eventName: keyof Contract['eventSignatures'] & string,
|
|
17
|
-
payload?: any
|
|
18
|
-
): any
|
|
19
|
-
on(
|
|
20
|
-
eventName: keyof Contract['eventSignatures'] & string,
|
|
21
|
-
listener: (payload?: any) => void | Promise<void>
|
|
22
|
-
): any
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface WidgetPadding {
|
|
26
|
-
top?: number
|
|
27
|
-
left?: number
|
|
28
|
-
bottom?: number
|
|
29
|
-
right?: number
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface WidgetButton {
|
|
33
|
-
label: string
|
|
34
|
-
onClick?: (cb: () => void) => void
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface BaseWidget<
|
|
38
|
-
Contract extends EventContract = any,
|
|
39
|
-
> extends MercuryEventEmitter<Contract> {
|
|
40
|
-
type: string
|
|
41
|
-
getId(): string | null
|
|
42
|
-
getFrame(): WidgetFrameCalculated
|
|
43
|
-
setFrame(frame: Partial<WidgetFrame>): void
|
|
44
|
-
getParent(): BaseWidget | null
|
|
45
|
-
destroy(): Promise<void>
|
|
46
|
-
getChildById(id?: string): BaseWidget | null
|
|
47
|
-
getChildren(): BaseWidget[]
|
|
48
|
-
addChild(child: BaseWidget): void
|
|
49
|
-
removeChild(child: BaseWidget): void
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type Color =
|
|
53
|
-
| 'black'
|
|
54
|
-
| 'red'
|
|
55
|
-
| 'green'
|
|
56
|
-
| 'yellow'
|
|
57
|
-
| 'blue'
|
|
58
|
-
| 'magenta'
|
|
59
|
-
| 'cyan'
|
|
60
|
-
| 'white'
|
|
61
|
-
| 'gray'
|
|
62
|
-
| 'brightRed'
|
|
63
|
-
| 'brightGreen'
|
|
64
|
-
| 'brightYellow'
|
|
65
|
-
| 'brightBlue'
|
|
66
|
-
| 'brightMagenta'
|
|
67
|
-
| 'brightCyan'
|
|
68
|
-
| 'brightWhite'
|
|
69
|
-
|
|
70
|
-
export interface UniversalWidgetOptions {
|
|
71
|
-
id?: string
|
|
72
|
-
width?: WidgetFrameAttribute
|
|
73
|
-
height?: WidgetFrameAttribute
|
|
74
|
-
left?: WidgetFrameAttribute
|
|
75
|
-
top?: WidgetFrameAttribute
|
|
76
|
-
parent?: BaseWidget
|
|
77
|
-
padding?: WidgetPadding
|
|
78
|
-
shouldLockWidthWithParent?: boolean
|
|
79
|
-
shouldLockHeightWithParent?: boolean
|
|
80
|
-
shouldLockRightWithParent?: boolean
|
|
81
|
-
shouldLockBottomWithParent?: boolean
|
|
82
|
-
eventContract?: EventContract
|
|
83
|
-
backgroundColor?: Color
|
|
84
|
-
foregroundColor?: Color
|
|
85
|
-
focusable?: boolean
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface WidgetFrame {
|
|
89
|
-
left: WidgetFrameAttribute
|
|
90
|
-
top: WidgetFrameAttribute
|
|
91
|
-
width: WidgetFrameAttribute
|
|
92
|
-
height: WidgetFrameAttribute
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface WidgetFrameCalculated {
|
|
96
|
-
left: number
|
|
97
|
-
top: number
|
|
98
|
-
width: number
|
|
99
|
-
height: number
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export type WidgetFrameAttribute = number | string
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BaseWidget } from './widgets.types.js'
|
|
2
|
-
|
|
3
|
-
// ** Window Widget ** //
|
|
4
|
-
export const windowEventContract = {
|
|
5
|
-
eventSignatures: {
|
|
6
|
-
key: {},
|
|
7
|
-
kill: {},
|
|
8
|
-
resize: {},
|
|
9
|
-
},
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type WindowEventContract = typeof windowEventContract
|
|
13
|
-
|
|
14
|
-
export interface WindowWidgetOptions {}
|
|
15
|
-
|
|
16
|
-
export interface WindowWidget extends BaseWidget<WindowEventContract> {
|
|
17
|
-
readonly type: 'window'
|
|
18
|
-
hideCursor: () => void
|
|
19
|
-
showCursor: () => void
|
|
20
|
-
setTitle: (title: string) => void
|
|
21
|
-
getFocusedWidget(): BaseWidget | null
|
|
22
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "nodenext",
|
|
4
|
-
"target": "esnext",
|
|
5
|
-
"lib": ["esnext"],
|
|
6
|
-
"types": ["node", "jest"],
|
|
7
|
-
"rootDir": "src",
|
|
8
|
-
"outDir": "build",
|
|
9
|
-
"sourceMap": false,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"noImplicitAny": true,
|
|
12
|
-
"noImplicitReturns": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"declaration": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"moduleDetection": "force",
|
|
19
|
-
"allowJs": true,
|
|
20
|
-
"resolveJsonModule": true,
|
|
21
|
-
"experimentalDecorators": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["./src/*.ts", "./src/**/*.ts"]
|
|
24
|
-
}
|