Skip to content

Commit

Permalink
Moved takeSnapshot into test-case-recorder package (#2514)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Jul 15, 2024
1 parent edfdec7 commit a2e4a61
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export { HatStability } from "./ide/types/HatStability";
export * from "./util";
export * from "./ide/util/messages";
export { getKey, splitKey } from "./util/splitKey";
export { hrtimeBigintToSeconds } from "./util/timeUtils";
export * from "./util/disposableFrom";
export * from "./util/camelCaseToAllDown";
export { Notifier } from "./util/Notifier";
Expand Down
1 change: 0 additions & 1 deletion packages/cursorless-engine/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./testUtil/plainObjectToTarget";
export * from "./testUtil/takeSnapshot";
export * from "./core/StoredTargets";
export * from "./cursorlessEngine";
export * from "./generateSpokenForm/defaultSpokenForms/surroundingPairsDelimiters";
Expand Down
2 changes: 1 addition & 1 deletion packages/cursorless-vscode/src/constructTestHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import {
import {
StoredTargetMap,
plainObjectToTarget,
takeSnapshot,
} from "@cursorless/cursorless-engine";
import { VscodeTestHelpers } from "@cursorless/vscode-common";
import * as vscode from "vscode";
import { takeSnapshot } from "@cursorless/test-case-recorder";
import { VscodeFileSystem } from "./ide/vscode/VscodeFileSystem";
import { VscodeIDE } from "./ide/vscode/VscodeIDE";
import { toVscodeEditor } from "./ide/vscode/toVscodeEditor";
Expand Down
2 changes: 1 addition & 1 deletion packages/test-case-recorder/src/TestCase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import {
import {
extractTargetKeys,
getPartialTargetDescriptors,
takeSnapshot,
type StoredTargetMap,
} from "@cursorless/cursorless-engine";
import { pick } from "lodash-es";
import { takeSnapshot } from "./takeSnapshot";

export class TestCase {
private languageId: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/test-case-recorder/src/TestCaseRecorder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
injectIde,
SpokenFormGenerator,
StoredTargetMap,
takeSnapshot,
} from "@cursorless/cursorless-engine";
import { getRecordedTestsDirPath, walkDirsSync } from "@cursorless/node-common";
import { invariant } from "immutability-helper";
Expand All @@ -37,6 +36,7 @@ import * as fs from "node:fs";
import { access, readFile } from "node:fs/promises";
import * as path from "node:path";
import { RecordTestCaseCommandOptions } from "./RecordTestCaseCommandOptions";
import { takeSnapshot } from "./takeSnapshot";
import { TestCase } from "./TestCase";

const CALIBRATION_DISPLAY_DURATION_MS = 50;
Expand Down
3 changes: 2 additions & 1 deletion packages/test-case-recorder/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./TestCaseRecorder";
export * from "./ScopeTestRecorder";
export * from "./takeSnapshot";
export * from "./TestCaseRecorder";
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import {
ExcludableSnapshotField,
ExtraContext,
ExtraSnapshotField,
hrtimeBigintToSeconds,
IDE,
rangeToPlainObject,
selectionToPlainObject,
SerializedMarks,
storedTargetKeys,
TestCaseSnapshot,
TextEditor,
} from "@cursorless/common";
import { type StoredTargetMap } from "../core/StoredTargets";
import { storedTargetKeys } from "@cursorless/common";
import type { StoredTargetMap } from "@cursorless/cursorless-engine";
import { hrtimeBigintToSeconds } from "./timeUtils";

export async function takeSnapshot(
storedTargets: StoredTargetMap | undefined,
Expand Down
File renamed without changes.

0 comments on commit a2e4a61

Please sign in to comment.