Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start on any Smithy files #96

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
],
"main": "./out/src/extension",
"preview": true,
"activationEvents": [
"workspaceContains:**/smithy-build.json",
"workspaceContains:**/*.smithy",
"workspaceContains:**/.smithy-project.json"
],
"contributes": {
"jsonValidation": [
{
Expand Down
3 changes: 3 additions & 0 deletions test-fixtures/suite6/smithy-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "1.0"
}
7 changes: 7 additions & 0 deletions tests/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ async function go() {
launchArgs: [resolve(__dirname, "../../test-fixtures/suite5")],
});

// Suite 6 - Startup
await runTests({
extensionDevelopmentPath,
extensionTestsPath: resolve(__dirname, "./suite6"),
launchArgs: [resolve(__dirname, "../../test-fixtures/suite6")],
});

// Confirm that webpacked and vsce packaged extension can be installed.
const vscodeExecutablePath = await downloadAndUnzipVSCode();
const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath);
Expand Down
13 changes: 13 additions & 0 deletions tests/suite6/extension.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as assert from "assert";
import * as vscode from "vscode";

suite("Startup", function () {
this.timeout(0);

test("Should start without opening a smithy file", async () => {
const extension = vscode.extensions.getExtension("smithy.smithy-vscode-extension");
assert.ok(extension.isActive);

return Promise.resolve();
});
});
5 changes: 5 additions & 0 deletions tests/suite6/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { runTests } from "../helper";

export function run(testsRoot: string, cb: (error: any, failures?: number) => void): void {
runTests(testsRoot, cb);
}
Loading