Skip to content

Commit 15ea7b4

Browse files
committed
fix linting
1 parent 4b75d07 commit 15ea7b4

File tree

7 files changed

+16
-10
lines changed

7 files changed

+16
-10
lines changed

.vscode-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ const testNames = [
1313
},
1414
];
1515

16-
fs.writeFileSync('out/test/projectCreation/testNames.json', JSON.stringify(testNames));
16+
fs.writeFileSync('out/projectCreation/testNames.json', JSON.stringify(testNames));
1717

1818
function getProjectTestConfigs(name, boards, compileTimeout=10000) {
1919
const ret = [];
2020
for (const board of boards) {
2121
ret.push({
2222
name: `${name} Project Compilation Test`,
23-
files: `out/test/projectCompilation/*.test.js`,
23+
files: `out/projectCompilation/*.test.js`,
2424
workspaceFolder: `.vscode-test/sampleWorkspace/projects/${board}/${name}`,
2525
mocha: {
2626
ui: 'tdd',
@@ -34,7 +34,7 @@ function getProjectTestConfigs(name, boards, compileTimeout=10000) {
3434
const configs = [
3535
{
3636
name: `Project Creation Tests`,
37-
files: `out/test/projectCreation/*.test.js`,
37+
files: `out/projectCreation/*.test.js`,
3838
workspaceFolder: '.vscode-test/sampleWorkspace',
3939
mocha: {
4040
ui: 'tdd',

src/commands/testCommands.mts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ import { EventEmitter } from "events";
77

88
/* ------------------------------ Main command ------------------------------ */
99

10-
export default class TestCreateProjectCommand extends CommandWithResultAndArgs<string> {
10+
export default class TestCreateProjectCommand
11+
extends CommandWithResultAndArgs<string> {
1112
constructor(private readonly _extensionUri: Uri) {
1213
super("testCreateProject");
1314
}
1415

1516
async execute(example: string, board: string): Promise<string> {
1617
const projectUri = workspace.workspaceFolders?.[0]?.uri;
17-
Logger.log(`Project URI: ${projectUri}`);
1818
if (!projectUri) {
1919
return "No project URI";
2020
}
21+
Logger.log(`Project URI: ${projectUri.toString()}`);
2122
const fspath = projectUri.fsPath;
2223

2324
const fspathUri = Uri.file(fspath + `/projects/${board}`);
24-
Logger.log(`fspath URI: ${fspathUri}`);
25+
Logger.log(`fspath URI: ${fspathUri.toString()}`);
2526

2627
NewProjectPanel._noOpenFolder = true;
2728

@@ -32,7 +33,7 @@ export default class TestCreateProjectCommand extends CommandWithResultAndArgs<s
3233

3334
await new Promise(resolve => setTimeout(resolve, 1000));
3435

35-
NewProjectPanel.sendTestMessage({
36+
await NewProjectPanel.sendTestMessage({
3637
command: "testCreateProject",
3738
value: {
3839
name: example,

src/extension.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ import {
124124
ZEPHYR_PICO_W,
125125
} from "./models/zephyrBoards.mjs";
126126
import { NewZephyrProjectPanel } from "./webview/newZephyrProjectPanel.mjs";
127-
import TestCreateProjectCommand, { TestRunTaskCommand } from "./commands/testCommands.mjs";
127+
import TestCreateProjectCommand, {
128+
TestRunTaskCommand,
129+
} from "./commands/testCommands.mjs";
128130

129131
export async function activate(context: ExtensionContext): Promise<void> {
130132
Logger.info(LoggerSource.extension, "Extension activation triggered");

src/webview/newProjectPanel.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,6 +2474,7 @@ export class NewProjectPanel {
24742474
// for tests which don't want to change the workspace folder
24752475
if (NewProjectPanel._noOpenFolder) {
24762476
NewProjectPanel._isCreated = true;
2477+
24772478
return;
24782479
}
24792480

@@ -2527,11 +2528,13 @@ export class NewProjectPanel {
25272528

25282529
public static testIfLoaded(): boolean {
25292530
NewProjectPanel._isCreated = false;
2531+
25302532
return NewProjectPanel._isLoaded;
25312533
}
25322534

25332535
public static testIfCreated(): boolean {
25342536
NewProjectPanel._isLoaded = false;
2537+
25352538
return NewProjectPanel._isCreated;
25362539
}
25372540
}

tests.tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"outDir": "out",
99
"sourceMap": true,
1010
"strict": true,
11-
"rootDir": "src"
11+
"rootDir": "test"
1212
},
1313
"include": [
14-
"src/test/**/*.ts",
14+
"test/**/*.ts",
1515
"./node_modules/vscode/vscode.d.ts",
1616
"./node_modules/vscode/lib/*"
1717
]

0 commit comments

Comments
 (0)