diff --git a/CHANGELOG.md b/CHANGELOG.md index 035c1a3..28f7110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to the "vscode-search-everywhere" extension will be documented in this file. +## [1.2.2] - 2022-02-18 +- Fixed issue related to not refreshing include patterns on configuration change + ## [1.2.1] - 2021-12-09 - Renamed QuickPick kind property to symbolKind due to new vscode QuickPick API (version 1.63.0) ## [1.2.0] - 2021-08-16 diff --git a/package.json b/package.json index d49b353..5d04ef8 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-search-everywhere", "displayName": "Search everywhere", "description": "Alternative for 'Go to symbol in workspace'. Fast and customizable files, symbols search engine", - "version": "1.2.1", + "version": "1.2.2", "preview": false, "publisher": "kbysiec", "author": { diff --git a/src/dataService.ts b/src/dataService.ts index e6a6e76..8dbaf9e 100644 --- a/src/dataService.ts +++ b/src/dataService.ts @@ -22,7 +22,6 @@ class DataService { constructor(private utils: Utils, private config: Config) { this.setCancelled(false); this.fetchConfig(); - this.initComponents(); } reload() { @@ -323,15 +322,12 @@ class DataService { private fetchConfig() { this.itemsFilter = this.config.getItemsFilter(); + this.patternProvider = new PatternProvider(this.config); } private setCancelled(value: boolean) { this.isCancelled = value; } - - private initComponents() { - this.patternProvider = new PatternProvider(this.config); - } } export default DataService; diff --git a/src/test/test/extension.test.ts b/src/test/test/extension.test.ts index 987decf..1dad1c1 100644 --- a/src/test/test/extension.test.ts +++ b/src/test/test/extension.test.ts @@ -1,9 +1,10 @@ -import * as vscode from "vscode"; import { assert } from "chai"; -import { getExtensionContext } from "../util/mockFactory"; +import * as sinon from "sinon"; +import * as vscode from "vscode"; import * as extension from "../../extension"; import ExtensionController from "../../extensionController"; import { getTestSetups } from "../testSetup/extension.testSetup"; +import { getExtensionContext } from "../util/mockFactory"; describe("extension", () => { let context: vscode.ExtensionContext = getExtensionContext(); @@ -29,11 +30,15 @@ describe("extension", () => { describe("deactivate", () => { it("1: should function exist", () => { - const [logStub] = setups.deactivate1(); + // const sandbox = sinon.createSandbox(); + // const stub = sandbox.stub(); + // const logStub = sandbox.replaceGetter(console, "log", () => stub()); + const logStub = sinon.spy(console, "log", ["get"]); + // const [logStub] = setups.deactivate1(); + // const logSpy = sinon.spy(console, "log", ["get"]); extension.deactivate(); - assert.equal(logStub.calledOnce, true); - assert.equal(typeof extension.deactivate, "function"); + assert.equal(logStub.get.calledOnce, true); }); });