Skip to content

Commit 44c8c9c

Browse files
authored
chore: Refactor test-utils tests (#78)
1 parent a86a6ff commit 44c8c9c

File tree

14 files changed

+85
-30
lines changed

14 files changed

+85
-30
lines changed
File renamed without changes.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"extends": "../tsconfig.json",
3-
"include": ["advanced-types.ts"]
2+
"extends": "../tsconfig.json"
43
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
export class DefaultValueWrapper {
4+
selectOption(index = 1): void {}
5+
6+
openDropdown(expandToViewport = false): void {}
7+
8+
getColumns(order: 'first' | 'last' = 'first'): void {}
9+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../tsconfig.json"
3+
}
File renamed without changes.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"extends": "../tsconfig.json",
3-
"include": ["inheritance.ts"]
2+
"extends": "../tsconfig.json"
43
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
22
"extends": "../tsconfig.json",
3-
"include": ["simple.ts"]
43
}

src/bootstrap/typescript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function loadTSConfig(tsconfigPath: string): ts.ParsedCommandLine {
2222
}
2323
const config = ts.parseJsonConfigFileContent(configFile.config, ts.sys, pathe.dirname(tsconfigPath));
2424
if (config.errors.length > 0) {
25+
console.error(...config.errors);
2526
throw new Error('Failed to parse tsconfig.json');
2627
}
2728
// this prints a warning that incremental mode is not supported in programmatic API

src/test-utils/interfaces.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
43
export interface Parameter {
54
name: string;
65
typeName?: string;
@@ -19,8 +18,8 @@ export interface TestUtilMethod {
1918
description?: string;
2019
returnType?: {
2120
name: string;
22-
type: string;
23-
typeArguments: Array<TypeArgument>;
21+
type?: string;
22+
typeArguments?: Array<TypeArgument>;
2423
};
2524
parameters: Array<Parameter>;
2625
inheritedFrom?: {

0 commit comments

Comments
 (0)