repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
aide | github_2023 | codestoryai | typescript | TestExclusions.clear | public clear(): void {
this.excluded.value = new Set();
} | /**
* Removes all test exclusions.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExclusions.ts#L71-L73 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExplorerFilterState.didSelectTestInExplorer | public didSelectTestInExplorer(testId: string) {
this.selectTestInExplorerEmitter.fire(testId);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExplorerFilterState.ts#L122-L124 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExplorerFilterState.focusInput | public focusInput() {
this.focusEmitter.fire();
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExplorerFilterState.ts#L127-L129 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExplorerFilterState.setText | public setText(text: string) {
if (text === this.text.value) {
return;
}
this.termFilterState = {};
this.globList = [];
this.includeTags.clear();
this.excludeTags.clear();
let globText = '';
let lastIndex = 0;
for (const match of text.matchAll(tagRe)) {
let nextIndex = match.index + match[0].l... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExplorerFilterState.ts#L132-L199 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExplorerFilterState.isFilteringFor | public isFilteringFor(term: TestFilterTerm) {
return !!this.termFilterState[term];
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExplorerFilterState.ts#L202-L204 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExplorerFilterState.toggleFilteringFor | public toggleFilteringFor(term: TestFilterTerm, shouldFilter?: boolean) {
const text = this.text.value.trim();
if (shouldFilter !== false && !this.termFilterState[term]) {
this.setText(text ? `${text} ${term}` : term);
} else if (shouldFilter !== true && this.termFilterState[term]) {
this.setText(trimExtraW... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExplorerFilterState.ts#L207-L214 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.fromExtHostTestItem | public static fromExtHostTestItem(item: TestItemLike, rootId: string, parent = item.parent) {
if (item._isRoot) {
return new TestId([rootId]);
}
const path = [item.id];
for (let i = parent; i && i.id !== rootId; i = i.parent) {
path.push(i.id);
}
path.push(rootId);
return new TestId(path.reverse()... | /**
* Creates a test ID from an ext host test item.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L37-L49 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.isRoot | public static isRoot(idString: string) {
return !idString.includes(TestIdPathParts.Delimiter);
} | /**
* Cheaply ets whether the ID refers to the root .
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L54-L56 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.root | public static root(idString: string) {
const idx = idString.indexOf(TestIdPathParts.Delimiter);
return idx === -1 ? idString : idString.slice(0, idx);
} | /**
* Cheaply gets whether the ID refers to the root .
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L61-L64 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.fromString | public static fromString(idString: string) {
return new TestId(idString.split(TestIdPathParts.Delimiter));
} | /**
* Creates a test ID from a serialized TestId instance.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L69-L71 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.join | public static join(base: TestId, b: string) {
return new TestId([...base.path, b]);
} | /**
* Gets the ID resulting from adding b to the base ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L76-L78 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.split | public static split(idString: string) {
return idString.split(TestIdPathParts.Delimiter);
} | /**
* Splits a test ID into its parts.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L83-L85 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.joinToString | public static joinToString(base: string | TestId, b: string) {
return base.toString() + TestIdPathParts.Delimiter + b;
} | /**
* Gets the string ID resulting from adding b to the base ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L90-L92 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.parentId | public static parentId(idString: string) {
const idx = idString.lastIndexOf(TestIdPathParts.Delimiter);
return idx === -1 ? undefined : idString.slice(0, idx);
} | /**
* Cheaply gets the parent ID of a test identified with the string.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L97-L100 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.localId | public static localId(idString: string) {
const idx = idString.lastIndexOf(TestIdPathParts.Delimiter);
return idx === -1 ? idString : idString.slice(idx + TestIdPathParts.Delimiter.length);
} | /**
* Cheaply gets the local ID of a test identified with the string.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L105-L108 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.isChild | public static isChild(maybeParent: string, maybeChild: string) {
return maybeChild[maybeParent.length] === TestIdPathParts.Delimiter && maybeChild.startsWith(maybeParent);
} | /**
* Gets whether maybeChild is a child of maybeParent.
* todo@connor4312: review usages of this to see if using the WellDefinedPrefixTree is better
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L114-L116 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.compare | public static compare(a: string, b: string) {
if (a === b) {
return TestPosition.IsSame;
}
if (TestId.isChild(a, b)) {
return TestPosition.IsChild;
}
if (TestId.isChild(b, a)) {
return TestPosition.IsParent;
}
return TestPosition.Disconnected;
} | /**
* Compares the position of the two ID strings.
* todo@connor4312: review usages of this to see if using the WellDefinedPrefixTree is better
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L122-L136 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.rootId | public get rootId(): TestId {
return new TestId(this.path, 1);
} | /**
* Gets the ID of the parent test.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L171-L173 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.parentId | public get parentId(): TestId | undefined {
return this.viewEnd > 1 ? new TestId(this.path, this.viewEnd - 1) : undefined;
} | /**
* Gets the ID of the parent test.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L178-L180 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.localId | public get localId() {
return this.path[this.viewEnd - 1];
} | /**
* Gets the local ID of the current full test ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L185-L187 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.controllerId | public get controllerId() {
return this.path[0];
} | /**
* Gets whether this ID refers to the root.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L192-L194 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.isRoot | public get isRoot() {
return this.viewEnd === 1;
} | /**
* Gets whether this ID refers to the root.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L199-L201 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.idsFromRoot | public *idsFromRoot() {
for (let i = 1; i <= this.viewEnd; i++) {
yield new TestId(this.path, i);
}
} | /**
* Returns an iterable that yields IDs of all parent items down to and
* including the current item.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L207-L211 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.idsToRoot | public *idsToRoot() {
for (let i = this.viewEnd; i > 0; i--) {
yield new TestId(this.path, i);
}
} | /**
* Returns an iterable that yields IDs of the current item up to the root
* item.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L217-L221 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.compare | public compare(other: TestId | string) {
if (typeof other === 'string') {
return TestId.compare(this.toString(), other);
}
for (let i = 0; i < other.viewEnd && i < this.viewEnd; i++) {
if (other.path[i] !== this.path[i]) {
return TestPosition.Disconnected;
}
}
if (other.viewEnd > this.viewEnd) ... | /**
* Compares the other test ID with this one.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L226-L246 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.toJSON | public toJSON() {
return this.toString();
} | /**
* Serializes the ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L251-L253 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestId.toString | public toString() {
if (!this.stringifed) {
this.stringifed = this.path[0];
for (let i = 1; i < this.viewEnd; i++) {
this.stringifed += TestIdPathParts.Delimiter;
this.stringifed += this.path[i];
}
}
return this.stringifed;
} | /**
* Serializes the ID to a string.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testId.ts#L258-L268 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.resolveHandler | public set resolveHandler(handler: undefined | ((item: T | undefined) => void)) {
this._resolveHandler = handler;
for (const test of this.tree.values()) {
this.updateExpandability(test);
}
} | /**
* Handler used for expanding test items.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L187-L192 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.collectDiff | public collectDiff() {
const diff = this.diff;
this.diff = [];
return diff;
} | /**
* Gets a diff of all changes that have been made, and clears the diff queue.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L206-L210 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.pushDiff | public pushDiff(diff: TestsDiffOp) {
switch (diff.op) {
case TestDiffOpType.DocumentSynced: {
for (const existing of this.diff) {
if (existing.op === TestDiffOpType.DocumentSynced && existing.uri === diff.uri) {
existing.docv = diff.docv;
return;
}
}
break;
}
case TestDiffO... | /**
* Pushes a new diff entry onto the collected diff list.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L215-L250 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.expand | public expand(testId: string, levels: number): Promise<void> | void {
const internal = this.tree.get(testId);
if (!internal) {
return;
}
if (internal.expandLevels === undefined || levels > internal.expandLevels) {
internal.expandLevels = levels;
}
// try to avoid awaiting things if the provider retu... | /**
* Expands the test and the given number of `levels` of children. If levels
* is < 0, then all children will be expanded. If it's 0, then only this
* item will be expanded.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L257-L279 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.updateExpandability | private updateExpandability(internal: CollectionItem<T>) {
let newState: TestItemExpandState;
if (!this._resolveHandler) {
newState = TestItemExpandState.NotExpandable;
} else if (internal.resolveBarrier) {
newState = internal.resolveBarrier.isOpen()
? TestItemExpandState.Expanded
: TestItemExpandSt... | /**
* Updates the `expand` state of the item. Should be called whenever the
* resolved state of the item changes. Can automatically expand the item
* if requested by a consumer.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L501-L525 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.expandChildren | private expandChildren(internal: CollectionItem<T>, levels: number): Promise<void> | void {
if (levels < 0) {
return;
}
const expandRequests: Promise<void>[] = [];
for (const [_, child] of this.options.getChildren(internal.actual)) {
const promise = this.expand(TestId.joinToString(internal.fullId, child.... | /**
* Expands all children of the item, "levels" deep. If levels is 0, only
* the children will be expanded. If it's 1, the children and their children
* will be expanded. If it's <0, it's a no-op.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L532-L548 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.resolveChildren | private resolveChildren(internal: CollectionItem<T>) {
if (internal.resolveBarrier) {
return internal.resolveBarrier;
}
if (!this._resolveHandler) {
const b = new Barrier();
b.open();
return b;
}
internal.expand = TestItemExpandState.BusyExpanding;
this.pushExpandStateUpdate(internal);
cons... | /**
* Calls `discoverChildren` on the item, refreshing all its tests.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L553-L590 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemCollection.flushDiff | public flushDiff() {
const diff = this.collectDiff();
if (diff.length) {
this.diffOpEmitter.fire(diff);
}
} | /**
* Immediately emits any pending diffs on the collection.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testItemCollection.ts#L627-L632 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.addProfile | public addProfile(controller: IMainThreadTestController, profile: ITestRunProfile): void {
const previousExplicitDefaultValue = this.userDefaults.get()?.[controller.id]?.[profile.profileId];
const extended: IExtendedTestRunProfile = {
...profile,
isDefault: previousExplicitDefaultValue ?? profile.isDefault,
... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L155-L177 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.updateProfile | public updateProfile(controllerId: string, profileId: number, update: Partial<ITestRunProfile>): void {
const ctrl = this.controllerProfiles.get(controllerId);
if (!ctrl) {
return;
}
const profile = ctrl.profiles.find(c => c.controllerId === controllerId && c.profileId === profileId);
if (!profile) {
r... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L180-L203 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.configure | public configure(controllerId: string, profileId: number) {
this.controllerProfiles.get(controllerId)?.controller.configureRunProfile(profileId);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L206-L208 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.removeProfile | public removeProfile(controllerId: string, profileId?: number): void {
const ctrl = this.controllerProfiles.get(controllerId);
if (!ctrl) {
return;
}
if (!profileId) {
this.controllerProfiles.delete(controllerId);
this.changeEmitter.fire();
return;
}
const index = ctrl.profiles.findIndex(c => ... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L211-L231 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.capabilitiesForTest | public capabilitiesForTest(test: ITestItem) {
const ctrl = this.controllerProfiles.get(TestId.root(test.extId));
if (!ctrl) {
return 0;
}
let capabilities = 0;
for (const profile of ctrl.profiles) {
if (!profile.tag || test.tags.includes(profile.tag)) {
capabilities |= capabilities & profile.group ... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L234-L248 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.all | public all() {
return this.controllerProfiles.values();
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L251-L253 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.getControllerProfiles | public getControllerProfiles(profileId: string) {
return this.controllerProfiles.get(profileId)?.profiles ?? [];
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L256-L258 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.getGroupDefaultProfiles | public getGroupDefaultProfiles(group: TestRunProfileBitset, controllerId?: string) {
const allProfiles = controllerId
? (this.controllerProfiles.get(controllerId)?.profiles || [])
: [...Iterable.flatMap(this.controllerProfiles.values(), c => c.profiles)];
const defaults = allProfiles.filter(c => c.group === g... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L261-L276 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestProfileService.setGroupDefaultProfiles | public setGroupDefaultProfiles(group: TestRunProfileBitset, profiles: ITestRunProfile[]) {
const next: DefaultsMap = {};
for (const ctrl of this.controllerProfiles.values()) {
next[ctrl.controller.id] = {};
for (const profile of ctrl.profiles) {
if (profile.group !== group) {
continue;
}
set... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testProfileService.ts#L279-L308 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TaskRawOutput.length | public get length() {
return this.offset;
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L133-L135 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TaskRawOutput.getRange | getRange(start: number, length: number): VSBuffer {
const buf = VSBuffer.alloc(length);
let bufLastWrite = 0;
for (const chunk of this.getRangeIter(start, length)) {
buf.buffer.set(chunk.buffer, bufLastWrite);
bufLastWrite += chunk.byteLength;
}
return bufLastWrite < length ? buf.slice(0, bufLastWrite)... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L138-L147 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TaskRawOutput.getRangeIter | *getRangeIter(start: number, length: number) {
let soFar = 0;
let internalLastRead = 0;
for (const b of this.buffers) {
if (internalLastRead + b.byteLength <= start) {
internalLastRead += b.byteLength;
continue;
}
const bstart = Math.max(0, start - internalLastRead);
const bend = Math.min(b.b... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L150-L170 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TaskRawOutput.append | public append(data: VSBuffer, marker?: number) {
const offset = this.offset;
let length = data.byteLength;
if (marker === undefined) {
this.push(data);
return { offset, length };
}
// Bytes that should be 'trimmed' off the end of data. This is done because
// selections in the terminal are based on t... | /**
* Appends data to the output, returning the byte range where the data can be found.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L175-L212 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TaskRawOutput.end | public end() {
this.endDeferred.complete();
} | /** Signals the output has ended. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L225-L227 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.completedAt | public get completedAt() {
return this._completedAt;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L300-L302 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | HydratedTestResult.tests | public get tests() {
return this.testById.values();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L312-L314 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.getTestById | public getTestById(id: string) {
return this.testById.get(id)?.item;
} | /** Gets an included test item by ID. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L317-L319 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | HydratedTestResult.getStateById | public getStateById(extTestId: string) {
return this.testById.get(extTestId);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L352-L354 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.appendOutput | public appendOutput(output: VSBuffer, taskId: string, location?: IRichLocation, testId?: string): void {
const preview = output.byteLength > 100 ? output.slice(0, 100).toString() + '…' : output.toString();
let marker: number | undefined;
// currently, the UI only exposes jump-to-message from tests or locations,
... | /**
* Appends output that occurred during the test run.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L359-L389 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.addTask | public addTask(task: ITestRunTask) {
this.tasks.push({ ...task, coverage: observableValue(this, undefined), otherMessages: [], output: new TaskRawOutput() });
for (const test of this.tests) {
test.tasks.push({ duration: undefined, messages: [], state: TestResultState.Unset });
}
this.newTaskEmitter.fire(th... | /**
* Adds a new run task to the results.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L394-L402 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.addTestChainToRun | public addTestChainToRun(controllerId: string, chain: ReadonlyArray<ITestItem>) {
let parent = this.testById.get(chain[0].extId);
if (!parent) { // must be a test root
parent = this.addTestToRun(controllerId, chain[0], null);
}
for (let i = 1; i < chain.length; i++) {
parent = this.addTestToRun(controlle... | /**
* Add the chain of tests to the run. The first test in the chain should
* be either a test root, or a previously-known test.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L408-L419 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.updateState | public updateState(testId: string, taskId: string, state: TestResultState, duration?: number) {
const entry = this.testById.get(testId);
if (!entry) {
return;
}
const index = this.mustGetTaskIndex(taskId);
const oldTerminalStatePrio = terminalStatePriorities[entry.tasks[index].state];
const newTerminal... | /**
* Updates the state of the test by its internal ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L424-L443 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.appendMessage | public appendMessage(testId: string, taskId: string, message: ITestMessage) {
const entry = this.testById.get(testId);
if (!entry) {
return;
}
entry.tasks[this.mustGetTaskIndex(taskId)].messages.push(message);
this.changeEmitter.fire({ item: entry, result: this, reason: TestResultItemChangeReason.NewMessa... | /**
* Appends a message for the test in the run.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L448-L456 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.markTaskComplete | public markTaskComplete(taskId: string) {
const index = this.mustGetTaskIndex(taskId);
const task = this.tasks[index];
task.running = false;
task.output.end();
this.setAllToState(
TestResultState.Unset,
taskId,
t => t.state === TestResultState.Queued || t.state === TestResultState.Running,
);
t... | /**
* Marks the task in the test run complete.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L461-L474 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.markComplete | public markComplete() {
if (this._completedAt !== undefined) {
throw new Error('cannot complete a test result multiple times');
}
for (const task of this.tasks) {
if (task.running) {
this.markTaskComplete(task.id);
}
}
this._completedAt = Date.now();
this.completeEmitter.fire();
this.telem... | /**
* Notifies the service that all tests are complete.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L479-L507 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.markRetired | public markRetired(testIds: WellDefinedPrefixTree<undefined> | undefined) {
for (const [id, test] of this.testById) {
if (!test.retired && (!testIds || testIds.hasKeyOrParent(TestId.fromString(id).path))) {
test.retired = true;
this.changeEmitter.fire({ reason: TestResultItemChangeReason.ComputedStateChang... | /**
* Marks the test and all of its children in the run as retired.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L512-L519 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.toJSON | public toJSON(): ISerializedTestResults | undefined {
return this.completedAt && this.persist ? this.doSerialize.value : undefined;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L524-L526 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | LiveTestResult.setAllToState | protected setAllToState(state: TestResultState, taskId: string, when: (task: ITestTaskState, item: TestResultItem) => boolean) {
const index = this.mustGetTaskIndex(taskId);
for (const test of this.testById.values()) {
if (when(test.tasks[index], test)) {
this.fireUpdateAndRefresh(test, index, state);
}
... | /**
* Updates all tests in the collection to the given state.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L535-L542 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | HydratedTestResult.toJSON | public toJSON(): ISerializedTestResults | undefined {
return this.persist ? this.serialized : undefined;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L706-L708 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | HydratedTestResult.toJSONWithMessages | public toJSONWithMessages(): ISerializedTestResults | undefined {
return this.toJSON();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResult.ts#L713-L715 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.results | public get results() {
this.loadResults();
return this._results;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L86-L89 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.getStateById | public getStateById(extId: string): [results: ITestResult, item: TestResultItem] | undefined {
for (const result of this.results) {
const lookup = result.getStateById(extId);
if (lookup && lookup.computedState !== TestResultState.Unset) {
return [result, lookup];
}
}
return undefined;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L126-L135 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.createLiveResult | public createLiveResult(req: ResolvedTestRunRequest | ExtensionRunTestsRequest) {
if ('targets' in req) {
const id = generateUuid();
return this.push(new LiveTestResult(id, true, req, this.insertOrderCounter++, this.telemetryService));
}
let profile: ITestRunProfile | undefined;
if (req.profile) {
con... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L140-L169 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.push | public push<T extends ITestResult>(result: T): T {
if (result.completedAt === undefined) {
this.results.unshift(result);
} else {
const index = findFirstIdxMonotonousOrArrLen(this.results, r => r.completedAt !== undefined && r.completedAt <= result.completedAt!);
this.results.splice(index, 0, result);
t... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L174-L216 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.getResult | public getResult(id: string) {
return this.results.find(r => r.id === id);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L221-L223 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultService.clear | public clear() {
const keep: ITestResult[] = [];
const removed: ITestResult[] = [];
for (const result of this.results) {
if (result.completedAt !== undefined) {
removed.push(result);
} else {
keep.push(result);
}
}
this._results = keep;
this.persistScheduler.schedule();
if (keep.length =... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultService.ts#L228-L245 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultStorage.persist | public override async persist(results: ReadonlyArray<ITestResult>) {
await super.persist(results);
if (Math.random() < CLEANUP_PROBABILITY) {
await this.cleanupDereferenced();
}
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultStorage.ts#L266-L271 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultStorage.cleanupDereferenced | private async cleanupDereferenced() {
const { children } = await this.fileService.resolve(this.directory);
if (!children) {
return;
}
const stored = new Set(this.stored.get([]).filter(s => s.rev === currentRevision).map(s => s.id));
await Promise.all(
children
.filter(child => !stored.has(child.na... | /**
* Cleans up orphaned files. For instance, output can get orphaned if it's
* written but the editor is closed before the test run is complete.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testResultStorage.ts#L277-L290 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | waitForTestToBeIdle | const waitForTestToBeIdle = (testService: ITestService, test: IncrementalTestCollectionItem) => {
if (!test.item.busy) {
return;
}
return new Promise<void>(resolve => {
const l = testService.onDidProcessDiff(() => {
if (testService.collection.getNodeById(test.item.extId)?.item.busy !== true) {
resolve();... | /**
* Waits for the test to no longer be in the "busy" state.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testService.ts#L156-L169 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | process | const process = (currentId: string[], node: IPrefixTreeNode<IncrementalTestCollectionItem>) => {
// directly included, don't try to over-specify, and children should be ignored
if (node.value) {
return node.value;
}
assert(!!node.children, 'expect to have children');
const thisChildren: IncrementalTestCo... | // Returns the node if it and any children should be included. Otherwise | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testService.ts#L264-L294 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.expandTest | public async expandTest(id: string, levels: number) {
await this.testControllers.get().get(TestId.fromString(id).controllerId)?.expandTest(id, levels);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L129-L131 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.cancelTestRun | public cancelTestRun(runId?: string, taskId?: string) {
this.cancelExtensionTestRunEmitter.fire({ runId, taskId });
if (runId === undefined) {
for (const runCts of this.uiRunningTests.values()) {
runCts.cancel();
}
} else if (!taskId) {
this.uiRunningTests.get(runId)?.cancel();
}
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L136-L146 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.runTests | public async runTests(req: AmbiguousRunTestsRequest, token = CancellationToken.None): Promise<ITestResult> {
// We try to ensure that all tests in the request will be run, preferring
// to use default profiles for each controller when possible.
const byProfile: { profile: ITestRunProfile; tests: InternalTestItem[... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L151-L207 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.startContinuousRun | public async startContinuousRun(req: ResolvedTestRunRequest, token: CancellationToken) {
if (!req.exclude) {
req.exclude = [...this.excluded.all];
}
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({
message: localize('testTrust', "Running tests may execute code in your workspace... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L210-L242 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.runResolvedTests | public async runResolvedTests(req: ResolvedTestRunRequest, token = CancellationToken.None) {
if (!req.exclude) {
req.exclude = [...this.excluded.all];
}
const result = this.testResults.createLiveResult(req);
const trust = await this.workspaceTrustRequestService.requestWorkspaceTrust({
message: localize('... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L247-L291 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.provideTestFollowups | public async provideTestFollowups(req: TestMessageFollowupRequest, token: CancellationToken): Promise<ITestFollowups> {
const reqs = await Promise.all([...this.testExtHosts].map(async ctrl =>
({ ctrl, followups: await ctrl.provideTestFollowups(req, token) })));
const followups: ITestFollowups = {
followups: ... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L296-L317 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.publishDiff | public publishDiff(_controllerId: string, diff: TestsDiff) {
this.willProcessDiffEmitter.fire(diff);
this.collection.apply(diff);
this.updateEditorContextKeys();
this.didProcessDiffEmitter.fire(diff);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L322-L327 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.getTestController | public getTestController(id: string) {
return this.testControllers.get().get(id);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L332-L334 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.syncTests | public async syncTests(): Promise<void> {
const cts = new CancellationTokenSource();
try {
await Promise.all([...this.testControllers.get().values()].map(c => c.syncTests(cts.token)));
} finally {
cts.dispose(true);
}
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L339-L346 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.refreshTests | public async refreshTests(controllerId?: string): Promise<void> {
const cts = new CancellationTokenSource();
this.testRefreshCancellations.add(cts);
this.isRefreshingTests.set(true);
try {
if (controllerId) {
await this.getTestController(controllerId)?.refreshTests(cts.token);
} else {
await Prom... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L351-L367 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.cancelRefreshTests | public cancelRefreshTests(): void {
for (const cts of this.testRefreshCancellations) {
cts.cancel();
}
this.testRefreshCancellations.clear();
this.isRefreshingTests.set(false);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L372-L378 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.registerExtHost | public registerExtHost(controller: IMainThreadTestHostProxy): IDisposable {
this.testExtHosts.add(controller);
return toDisposable(() => this.testExtHosts.delete(controller));
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L383-L386 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.getTestsRelatedToCode | public async getTestsRelatedToCode(uri: URI, position: Position, token: CancellationToken = CancellationToken.None): Promise<InternalTestItem[]> {
const testIds = await Promise.all([...this.testExtHosts.values()].map(v => v.getTestsRelatedToCode(uri, position, token)));
// ext host will flush diffs before returning... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L391-L395 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.registerTestController | public registerTestController(id: string, controller: IMainThreadTestController): IDisposable {
this.testControllers.set(new Map(this.testControllers.get()).set(id, controller), undefined);
return toDisposable(() => {
const diff: TestsDiff = [];
for (const root of this.collection.rootItems) {
if (root.co... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L400-L417 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestService.getCodeRelatedToTest | public async getCodeRelatedToTest(test: InternalTestItem, token: CancellationToken = CancellationToken.None): Promise<Location[]> {
return (await this.testControllers.get().get(test.controllerId)?.getRelatedCode(test.item.extId, token)) || [];
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testServiceImpl.ts#L422-L424 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContentProvider.provideTextContent | public async provideTextContent(resource: URI): Promise<ITextModel | null> {
const existing = this.modelService.getModel(resource);
if (existing && !existing.isDisposed()) {
return existing;
}
const parsed = parseTestUri(resource);
if (!parsed) {
return null;
}
const result = this.resultService.ge... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContentProvider.ts#L37-L135 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.isSpecificallyEnabledFor | public isSpecificallyEnabledFor(testId: string): boolean {
return this.running.size > 0 && this.running.hasKey(TestId.fromString(testId).path);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L129-L131 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.isEnabledForAParentOf | public isEnabledForAParentOf(testId: string): boolean {
return !!this.running.root.value || (this.running.size > 0 && this.running.hasKeyOrParent(TestId.fromString(testId).path));
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L134-L136 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.isEnabledForProfile | public isEnabledForProfile({ profileId, controllerId }: ITestRunProfile): boolean {
for (const node of this.running.values()) {
if (node.profiles.get().some(p => p.profileId === profileId && p.controllerId === controllerId)) {
return true;
}
}
return false;
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L139-L147 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.isEnabledForAChildOf | public isEnabledForAChildOf(testId: string): boolean {
return !!this.running.root.value || (this.running.size > 0 && this.running.hasKeyOrChildren(TestId.fromString(testId).path));
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L150-L152 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.isEnabled | public isEnabled(): boolean {
return !!this.running.root.value || this.running.size > 0;
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L155-L157 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.start | public start(profiles: ITestRunProfile[] | TestRunProfileBitset, testId?: string): void {
const store = new DisposableStore();
let actualProfiles: ISettableObservable<ITestRunProfile[]>;
if (profiles instanceof Array) {
actualProfiles = observableValue('crProfiles', profiles);
} else {
// restart the con... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L160-L229 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getRelevant | const getRelevant = () => this.testProfileService.getGroupDefaultProfiles(profiles)
.filter(p => p.supportsContinuousRun && (!testId || TestId.root(testId) === p.controllerId)); | // restart the continuous run when default profiles change, if we were | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L169-L170 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.stopProfile | stopProfile({ profileId, controllerId }: ITestRunProfile): void {
const toDelete: RunningRef[] = [];
for (const node of this.running.values()) {
const profs = node.profiles.get();
const filtered = profs.filter(p => p.profileId !== profileId || p.controllerId !== controllerId);
if (filtered.length === profs... | /** Stops a continuous run for the profile across all test items that are running it. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L232-L252 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingContinuousRunService.stop | public stop(testId?: string): void {
const cancellations = [...this.running.deleteRecursive(testId ? TestId.fromString(testId).path : [])];
// deleteRecursive returns a BFS order, reverse it so children are cancelled before parents
for (let i = cancellations.length - 1; i >= 0; i--) {
cancellations[i].handle.d... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testingContinuousRunService.ts#L255-L263 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.