Skip to content

Commit

Permalink
Fixed issue related to not refreshing include patterns on configurati…
Browse files Browse the repository at this point in the history
…on change
  • Loading branch information
kbysiec committed Feb 18, 2022
1 parent 5c42137 commit be61501
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 1 addition & 5 deletions src/dataService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class DataService {
constructor(private utils: Utils, private config: Config) {
this.setCancelled(false);
this.fetchConfig();
this.initComponents();
}

reload() {
Expand Down Expand Up @@ -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;
15 changes: 10 additions & 5 deletions src/test/test/extension.test.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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);
});
});

Expand Down

0 comments on commit be61501

Please sign in to comment.