Skip to content

Commit 457661b

Browse files
committed
Migrate to node test runner
1 parent e389d0c commit 457661b

139 files changed

Lines changed: 1325 additions & 860 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.

‎test/core/RenderPipeline.js‎

Lines changed: 0 additions & 25 deletions
This file was deleted.

‎test/core/RenderPipeline.ts‎

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { describe, it } from "node:test";
2+
import assert from "node:assert/strict";
3+
import { GeometryPass, RenderPipeline } from "postprocessing";
4+
import { PerspectiveCamera, Scene } from "three";
5+
6+
describe("RenderPipeline", () => {
7+
8+
it("can be instantiated", () => {
9+
10+
assert.doesNotThrow(() => new RenderPipeline());
11+
12+
});
13+
14+
it("can be disposed", () => {
15+
16+
const object = new RenderPipeline();
17+
assert.doesNotThrow(() => object.dispose());
18+
19+
});
20+
21+
it("can add a pass", t => {
22+
23+
const scene = new Scene();
24+
const camera = new PerspectiveCamera();
25+
26+
const pipeline = new RenderPipeline();
27+
const geometryPass = new GeometryPass(scene, camera);
28+
29+
assert.doesNotThrow(() => pipeline.add(geometryPass));
30+
31+
});
32+
33+
it("can reset the output default buffer", t => {
34+
35+
const scene = new Scene();
36+
const camera = new PerspectiveCamera();
37+
38+
const pipeline = new RenderPipeline();
39+
const geometryPass = new GeometryPass(scene, camera);
40+
41+
pipeline.add(geometryPass);
42+
assert.doesNotThrow(() => geometryPass.output.removeDefaultBuffer());
43+
44+
});
45+
46+
});

‎test/core/io/IOManager.js‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎test/core/io/IOManager.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { describe, it } from "node:test";
2+
import assert from "node:assert/strict";
3+
import { IOManager } from "postprocessing";
4+
5+
describe("IOManager", () => {
6+
7+
it("can be instantiated", () => {
8+
9+
assert.doesNotThrow(() => new IOManager());
10+
11+
});
12+
13+
});

‎test/core/io/Input.js‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎test/core/io/Input.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { describe, it } from "node:test";
2+
import assert from "node:assert/strict";
3+
import { Input } from "postprocessing";
4+
5+
describe("Input", () => {
6+
7+
it("can be instantiated", () => {
8+
9+
assert.doesNotThrow(() => new Input());
10+
11+
});
12+
13+
});

‎test/core/io/Output.js‎

Lines changed: 0 additions & 8 deletions
This file was deleted.

‎test/core/io/Output.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { describe, it } from "node:test";
2+
import assert from "node:assert/strict";
3+
import { Output } from "postprocessing";
4+
5+
describe("Output", () => {
6+
7+
it("can be instantiated", () => {
8+
9+
assert.doesNotThrow(() => new Output());
10+
11+
});
12+
13+
});

‎test/core/io/RenderTargetResource.js‎

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { describe, it } from "node:test";
2+
import assert from "node:assert/strict";
3+
import { RenderTargetResource } from "postprocessing";
4+
5+
describe("RenderTargetResource", () => {
6+
7+
it("can be instantiated", () => {
8+
9+
assert.doesNotThrow(() => new RenderTargetResource());
10+
11+
});
12+
13+
});

0 commit comments

Comments
 (0)