Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive test suite for the splat-transform library using Node.js built-in test runner. The suite validates format conversions (PLY, Compressed PLY, SOG, SPLAT, KSPLAT, SPZ, CSV, MJS), HTML viewer generation, and data transformation operations (translate, rotate, scale, filters).
Changes:
- Added test infrastructure with comparison utilities and test data generators
- Created binary test fixtures for input-only formats (SPLAT, KSPLAT, SPZ)
- Implemented 37 tests across 21 suites covering all major functionality
- Added test scripts to package.json
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/helpers/summary-compare.mjs | Utilities for comparing DataTable summaries with configurable tolerance |
| test/helpers/test-utils.mjs | Test data creation helpers and PLY binary encoding |
| test/fixtures/generator.mjs | Deterministic 4x4 grid splat generator for reproducible tests |
| test/fixtures/create-fixtures.mjs | Script to synthesize minimal binary test fixtures |
| test/fixtures/splat/minimal.splat | Binary test fixture with 4 splats in antimatter15 format |
| test/fixtures/splat/minimal.ksplat | Binary test fixture with 4 splats in mkkellogg format |
| test/fixtures/splat/minimal.spz | Binary test fixture with 4 splats in Niantic SPZ format |
| test/formats.test.mjs | Format conversion and round-trip tests |
| test/html-output.test.mjs | HTML viewer generation tests |
| test/transforms.test.mjs | Transformation and filter operation tests |
| package.json | Added test and test:fixtures scripts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
willeastcott
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add comprehensive test suite for format conversions and transformations
Implements a complete test suite using Node.js built-in test runner to validate all input/output formats and transformation operations.
Changes
Test Infrastructure
test/helpers/summary-compare.mjs- Utilities for comparing DataTable summaries with configurable tolerancetest/helpers/test-utils.mjs- Test data creation helpers and PLY binary encodingtest/fixtures/generator.mjs- Deterministic 4x4 grid splat generator for reproducible teststest/fixtures/create-fixtures.mjs- Script to synthesize minimal binary test fixturesBinary Test Fixtures
minimal.splat- 4 splats in antimatter15 format (128 bytes)minimal.ksplat- 4 splats in mkkellogg format, compression mode 0minimal.spz- 4 splats in Niantic SPZ version 2 formatFormat Tests (
test/formats.test.mjs)HTML Output Tests (
test/html-output.test.mjs)Transformation Tests (
test/transforms.test.mjs)Package Updates
testscript:node --test test/*.test.mjstest:fixturesscript for regenerating binary fixturesValidation Approach
Tests use
computeSummary()to verify data correctness. Lossless formats use exact comparison; lossy formats use tolerance-based summary comparison.Test Results
37 tests across 21 suites, all passing.