Skip to content

Commit 3cfbd58

Browse files
authored
Merge pull request #22 from PragmaticMachineLearning/clean-up
Reorganize tests into dedicated directory structure
2 parents 95ba5df + 3eb6bf6 commit 3cfbd58

17 files changed

Lines changed: 31 additions & 25 deletions

AGENT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This app uses the gauss formula engine which is in this path /home/chief/gaussformula
2+
3+
Reference it whenever we have engine related issues to address or to provide more context about what we are building
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from 'vitest'
22

3-
import { deriveAnalysisState, getColumnName } from './analysisState'
3+
import { deriveAnalysisState, getColumnName } from '../../../src/app/analysisState'
44

55
describe('analysisState', () => {
66
it('formats spreadsheet column labels', () => {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { describe, expect, it } from "vitest";
22

3-
import { GaussFormulaEngine } from "../lib/formulaEngine";
4-
import { cellAddressToA1 } from "./address";
5-
import type { WorkbookSnapshot } from "./workbookSnapshot";
3+
import { cellAddressToA1 } from "../../../src/assistant/address";
64
import {
75
applyAssistantChangesToEngine,
86
extractAssistantProposalFromText,
97
stripAssistantProposalFromText,
108
validateAssistantProposal,
11-
} from "./proposals";
9+
} from "../../../src/assistant/proposals";
10+
import type { WorkbookSnapshot } from "../../../src/assistant/workbookSnapshot";
11+
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";
1212

1313
const snapshot: WorkbookSnapshot = {
1414
sheetName: "Sheet1",

src/assistant/workbookSnapshot.test.ts renamed to tests/unit/assistant/workbookSnapshot.test.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { describe, expect, it } from "vitest";
22

3-
import { GaussFormulaEngine } from "../lib/formulaEngine";
4-
import { cellAddressFromA1, cellAddressToA1 } from "./address";
5-
import { buildWorkbookSnapshot } from "./workbookSnapshot";
3+
import {
4+
cellAddressFromA1,
5+
cellAddressToA1,
6+
} from "../../../src/assistant/address";
7+
import { buildWorkbookSnapshot } from "../../../src/assistant/workbookSnapshot";
8+
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";
69

710
describe("assistant workbook snapshot", () => {
811
it("converts between zero-based coordinates and A1 addresses", () => {

src/components/charts/distributionChartOptions.test.ts renamed to tests/unit/components/charts/distributionChartOptions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
type DistributionChartModelFromDataInput,
1313
type DistributionChartModelInput,
1414
type DistributionQueryState,
15-
} from './distributionChartOptions'
15+
} from '../../../../src/components/charts/distributionChartOptions'
1616

1717
const themeColors: ChartThemeColors = {
1818
textPrimary: '#1f2d2d',

src/components/flow-diagram/useLayoutNodes.test.ts renamed to tests/unit/components/flow-diagram/useLayoutNodes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
shouldAutoFitAfterGraphRefresh,
77
type LayoutEdge,
88
type LayoutNode,
9-
} from "./useLayoutNodes";
9+
} from "../../../../src/components/flow-diagram/useLayoutNodes";
1010

1111
const node = (id: string): LayoutNode => ({
1212
id,

src/components/spreadsheet/cellFormatting.test.ts renamed to tests/unit/components/spreadsheet/cellFormatting.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from 'vitest'
22

3-
import { formatCellValue } from './cellFormatting'
3+
import { formatCellValue } from '../../../../src/components/spreadsheet/cellFormatting'
44

55
const sampledValue = {
66
samples: [1, 2, 3],
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it } from "vitest";
22

3-
import { spreadsheetExamples } from "./examples";
4-
import { GaussFormulaEngine } from "../lib/formulaEngine";
3+
import { spreadsheetExamples } from "../../../src/examples/examples";
4+
import { GaussFormulaEngine } from "../../../src/lib/formulaEngine";
55

66
const a1ToAddress = (address: string) => {
77
const match = address.match(/^([A-Z]+)(\d+)$/);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, it } from "vitest";
22

3-
import { formatFormulaBarCellValue } from "./useFormulaBar";
3+
import { formatFormulaBarCellValue } from "../../../src/hooks/useFormulaBar";
44

55
describe("formatFormulaBarCellValue", () => {
66
it("formats variance-backed summaries as standard deviation", () => {

0 commit comments

Comments
 (0)