diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a38268..2bc594a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,8 +129,8 @@ jobs: env: VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }} - - name: Publish to Open VSX Registry - run: pnpm run publish:open-vsx -p ${{ secrets.OPEN_VSX_TOKEN }} + # - name: Publish to Open VSX Registry + # run: pnpm run publish:open-vsx -p ${{ secrets.OPEN_VSX_TOKEN }} - name: Github Release run: npx changelogithub diff --git a/test/index.ts b/test/index.ts index f63a1f4..04192aa 100644 --- a/test/index.ts +++ b/test/index.ts @@ -7,19 +7,19 @@ import Mocha from 'mocha'; * !: must be synchronized */ export function run(testsRoot: string, cb: (error: any, failures?: number) => void): void { - const mocha = new Mocha({ color: true }); + const mocha = new Mocha({ color: true }); - glob('**/**.test.js', { cwd: testsRoot }) - .then((files) => { - for (const f of files) mocha.addFile(path.resolve(testsRoot, f)); + glob('**/**.test.js', { cwd: testsRoot }) + .then((files) => { + for (const f of files) mocha.addFile(path.resolve(testsRoot, f)); - try { - mocha.run((failures) => { - cb(null, failures); - }); - } catch (error) { - cb(error); - } - }) - .catch((error) => cb(error)); + try { + mocha.run((failures) => { + cb(null, failures); + }); + } catch (error) { + cb(error); + } + }) + .catch((error) => cb(error)); } diff --git a/test/runTests.ts b/test/runTests.ts index 6992125..e605e50 100644 --- a/test/runTests.ts +++ b/test/runTests.ts @@ -3,15 +3,19 @@ import { resolve } from 'node:path'; import { runTests } from '@vscode/test-electron'; (async function go() { - const projectPath = resolve(__dirname, '../../'); - const extensionDevelopmentPath = projectPath; - const extensionTestsPath = resolve(projectPath, './out/test'); - const testWorkspace = resolve(projectPath, './test-workspace'); + const projectPath = resolve(__dirname, '../../'); + const extensionDevelopmentPath = projectPath; + const extensionTestsPath = resolve(projectPath, './out/test'); + const testWorkspace = resolve(projectPath, './test-workspace'); - await runTests({ - version: 'insiders', - extensionDevelopmentPath, - extensionTestsPath, - launchArgs: ['--disable-extensions', testWorkspace], - }); + try { + await runTests({ + version: 'insiders', + extensionDevelopmentPath, + extensionTestsPath, + launchArgs: ['--disable-extensions', testWorkspace], + }); + } catch (error) { + console.log(error); + } })(); diff --git a/test/sample.test.ts b/test/sample.test.ts index 1f5f27d..702c4b4 100644 --- a/test/sample.test.ts +++ b/test/sample.test.ts @@ -3,15 +3,15 @@ import { strictEqual } from 'node:assert'; import vscode from 'vscode'; describe('#test sample', () => { - before(() => { - vscode.window.showInformationMessage('Test begin!'); - }); + before(() => { + vscode.window.showInformationMessage('Test begin!'); + }); - it('one plus one equals two', () => { - strictEqual(2, 1 + 1); - }); + it('one plus one equals two', () => { + strictEqual(2, 1 + 1); + }); - after(() => { - vscode.window.showInformationMessage('Test end!'); - }); + after(() => { + vscode.window.showInformationMessage('Test end!'); + }); }); diff --git a/test/tsconfig.json b/test/tsconfig.json index fae53a4..f929641 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,12 +1,12 @@ { - "extends": "../tsconfig.base.json", - "compilerOptions": { - "outDir": "../out/test" - }, - "include": ["**/*.ts"], - "references": [ - { - "path": "../src/tsconfig.json" - } - ] + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "../out/test" + }, + "include": ["**/*.ts"], + "references": [ + { + "path": "../src/tsconfig.json" + } + ] }