diff --git a/packages/backend/src/prelude/symbol.ts b/packages/backend/src/prelude/symbol.ts deleted file mode 100644 index 5b88467d46..0000000000 --- a/packages/backend/src/prelude/symbol.ts +++ /dev/null @@ -1 +0,0 @@ -export const fallback = Symbol("fallback"); diff --git a/packages/backend/src/services/chart/charts/test-grouped.ts b/packages/backend/src/services/chart/charts/test-grouped.ts deleted file mode 100644 index 6520099fe6..0000000000 --- a/packages/backend/src/services/chart/charts/test-grouped.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { KVs } from "../core.js"; -import Chart from "../core.js"; -import { name, schema } from "./entities/test-grouped.js"; - -/** - * For testing - */ - -export default class TestGroupedChart extends Chart { - private total = {} as Record; - - constructor() { - super(name, schema, true); - } - - protected async tickMajor( - group: string, - ): Promise>> { - return { - "foo.total": this.total[group], - }; - } - - protected async tickMinor(): Promise>> { - return {}; - } - - public async increment(group: string): Promise { - if (this.total[group] == null) this.total[group] = 0; - - this.total[group]++; - - await this.commit( - { - "foo.total": 1, - "foo.inc": 1, - }, - group, - ); - } -} diff --git a/packages/backend/src/services/chart/charts/test-intersection.ts b/packages/backend/src/services/chart/charts/test-intersection.ts deleted file mode 100644 index 0fa973861f..0000000000 --- a/packages/backend/src/services/chart/charts/test-intersection.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { KVs } from "../core.js"; -import Chart from "../core.js"; -import { name, schema } from "./entities/test-intersection.js"; - -/** - * For testing - */ - -export default class TestIntersectionChart extends Chart { - constructor() { - super(name, schema); - } - - protected async tickMajor(): Promise>> { - return {}; - } - - protected async tickMinor(): Promise>> { - return {}; - } - - public async addA(key: string): Promise { - await this.commit({ - a: [key], - }); - } - - public async addB(key: string): Promise { - await this.commit({ - b: [key], - }); - } -} diff --git a/packages/backend/src/services/chart/charts/test-unique.ts b/packages/backend/src/services/chart/charts/test-unique.ts deleted file mode 100644 index 095021622c..0000000000 --- a/packages/backend/src/services/chart/charts/test-unique.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { KVs } from "../core.js"; -import Chart from "../core.js"; -import { name, schema } from "./entities/test-unique.js"; - -/** - * For testing - */ - -export default class TestUniqueChart extends Chart { - constructor() { - super(name, schema); - } - - protected async tickMajor(): Promise>> { - return {}; - } - - protected async tickMinor(): Promise>> { - return {}; - } - - public async uniqueIncrement(key: string): Promise { - await this.commit({ - foo: [key], - }); - } -} diff --git a/packages/backend/src/services/chart/charts/test.ts b/packages/backend/src/services/chart/charts/test.ts deleted file mode 100644 index afdb3bf14e..0000000000 --- a/packages/backend/src/services/chart/charts/test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import type { KVs } from "../core.js"; -import Chart from "../core.js"; -import { name, schema } from "./entities/test.js"; - -/** - * For testing - */ - -export default class TestChart extends Chart { - public total = 0; // publicにするのはテストのため - - constructor() { - super(name, schema); - } - - protected async tickMajor(): Promise>> { - return { - "foo.total": this.total, - }; - } - - protected async tickMinor(): Promise>> { - return {}; - } - - public async increment(): Promise { - this.total++; - - await this.commit({ - "foo.total": 1, - "foo.inc": 1, - }); - } - - public async decrement(): Promise { - this.total--; - - await this.commit({ - "foo.total": -1, - "foo.dec": 1, - }); - } -}