Skip to content

Commit fcec8d8

Browse files
authored
chore: Move individual example tests to apps/typegpu-docs (#2291)
1 parent bbb834d commit fcec8d8

113 files changed

Lines changed: 245 additions & 190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/typegpu-docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"magic-string": "^0.30.21",
8484
"tailwindcss": "^4.1.11",
8585
"tailwindcss-motion": "^1.1.1",
86+
"typegpu-testing-utility": "workspace:*",
8687
"vite-imagetools": "catalog:frontend",
8788
"vite-plugin-wasm": "^3.5.0",
8889
"yaml": "^2.8.1"

packages/typegpu/tests/examples/individual/3d-fish.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/3d-fish.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88
import {
99
mock3DModelLoading,
1010
mockCreateImageBitmap,
1111
mockResizeObserver,
12-
} from '../utils/commonMocks.ts';
12+
} from './utils/commonMocks.ts';
1313

1414
describe('3d fish example', () => {
1515
setupCommonMocks();

packages/typegpu/tests/examples/individual/ascii-filter.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/ascii-filter.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('ascii filter example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/blur.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/blur.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
8-
import { mockCreateImageBitmap, mockImageLoading } from '../utils/commonMocks.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
8+
import { mockCreateImageBitmap, mockImageLoading } from './utils/commonMocks.ts';
99

1010
describe('blur example', () => {
1111
setupCommonMocks();

packages/typegpu/tests/examples/individual/boids.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/boids.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('boids example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/box-raytracing.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/box-raytracing.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('box raytracing example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/camera-thresholding.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/camera-thresholding.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('camera thresholding example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/caustics.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/caustics.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('caustics example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/chroma-keying.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/chroma-keying.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
88

99
describe('chroma keying example', () => {
1010
setupCommonMocks();

packages/typegpu/tests/examples/individual/clouds.test.ts renamed to apps/typegpu-docs/tests/individual-example-tests/clouds.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44

55
import { describe, expect } from 'vitest';
6-
import { it } from '../../utils/extendedIt.ts';
7-
import { runExampleTest, setupCommonMocks } from '../utils/baseTest.ts';
8-
import { mockResizeObserver } from '../utils/commonMocks.ts';
6+
import { it } from 'typegpu-testing-utility';
7+
import { runExampleTest, setupCommonMocks } from './utils/baseTest.ts';
8+
import { mockResizeObserver } from './utils/commonMocks.ts';
99

1010
describe('clouds example', () => {
1111
setupCommonMocks();

0 commit comments

Comments
 (0)