com um clique
testing
// Use when writing tests, debugging test failures, running the test suite, or setting up test infrastructure. Covers self-test, package tests, and modern E2E tests.
// Use when writing tests, debugging test failures, running the test suite, or setting up test infrastructure. Covers self-test, package tests, and modern E2E tests.
Use when bumping Meteor package versions for beta, RC, or official releases. Covers the two version schemes (meteor-tool vs all other packages), the update-semver automation tool, manual files the tool does not handle, and the full lifecycle from beta through official release. Applies to packages/*/package.js, scripts/admin/, npm-packages/meteor-installer/, and .meteor/versions in test apps.
Use for writing, reviewing, editing, or generating Meteor release changelog entries. Defines canonical file locations, naming rules, required section structure, formatting conventions, PR-based generation workflow (with gh CLI and web fallback), incremental updates, and common entry patterns. Applies to files under v3-docs/docs/generators/changelog/versions/.
Use when analyzing release branch changes for missing user-facing documentation. Compares the release branch against devel, filters for user-facing changes, scans v3-docs/docs/ for coverage, and produces a gap report (.md file) with prioritized documentation opportunities. Does NOT write documentation — only identifies gaps and outputs a plan for later action.
Use when adding, modifying, or reviewing E2E test apps/skeletons to keep the test coverage report up to date.
Use when creating, updating, or maintaining AI documentation files (AGENTS.md, CLAUDE.md, skills). Covers file structure, conventions, and guidelines for evolving AI context.
Use when understanding the build system, modifying CLI commands, working with isobuild, or navigating the tools/ directory. Covers build pipeline flow and file locations.
| name | testing |
| description | Use when writing tests, debugging test failures, running the test suite, or setting up test infrastructure. Covers self-test, package tests, and modern E2E tests. |
Test patterns, commands, and utilities for the Meteor codebase.
# CLI self-tests
./meteor self-test # Run all CLI tests
./meteor self-test "test name" # Run specific test
./meteor self-test --list # List available tests
./meteor self-test --exclude "^[a-b]" # Exclude tests by regex
./meteor self-test --retries 0 # Skip retries in development
# Package tests (TinyTest — view results at http://localhost:3000)
./meteor test-packages # Test all core packages
./meteor test-packages mongo # Test specific package
TINYTEST_FILTER="collection" ./meteor test-packages # Filter specific tests
# Package tests in console (headless via Puppeteer — prints results to terminal)
# Use this for automation or when you need terminal output without a browser.
PUPPETEER_DOWNLOAD_PATH=~/.npm/chromium ./packages/test-in-console/run.sh
./packages/test-in-console/run.sh # Test all core packages
./packages/test-in-console/run.sh "mongo" # Test specific package
# E2E tests (Jest + Playwright)
npm run install:e2e # Install dependencies
npm run test:e2e # Run all E2E tests
npm run test:e2e -- -t="React" # Run specific test
# Native mobile smoke tests (Maestro)
npm run install:native # Install deps, verify Maestro CLI on PATH
npm run test:native:android # Run Android smoke flow
npm run test:native:ios # Run iOS smoke flow
tools/e2e-tests/)Jest + Playwright suite for verifying bundler integrations (rspack). Tests cover framework skeletons and build scenarios.
Test apps: apps/{react,vue,svelte,solid,blaze,typescript,babel,coffeescript,monorepo}
tools/native-tests/)Plain Node orchestrator + Maestro YAML flows. Builds a minimal Meteor app for
Cordova, installs it on an iOS Simulator or Android emulator, asserts the app
launches and DDP connects. Runs nightly in CI plus on PRs labeled mobile.
Local prerequisites: Maestro CLI (curl -fsSL https://get.maestro.mobile.dev | bash),
Xcode (iOS), Android SDK + emulator (Android).
Tests: flows/launch.yaml against apps/smoke/.
packages/test-helpers)Comprehensive testing utilities for Meteor applications.
import { testAsyncMulti, simplePoll, waitUntil } from 'meteor/test-helpers';
// Wait for condition
await waitUntil(() => someCondition, { timeout: 5000, interval: 100 });
// Poll until ready
simplePoll(() => isReady(), successCallback, failCallback);
import { clickElement, simulateEvent, canonicalizeHtml, renderToDiv } from 'meteor/test-helpers';
clickElement(button);
simulateEvent(input, 'keydown', { keyCode: 13 });
const normalized = canonicalizeHtml(html);
import { makeTestConnection, captureConnectionMessages } from 'meteor/test-helpers';
const conn = makeTestConnection(clientId);
const messages = captureConnectionMessages(server);
| Function | Description |
|---|---|
SeededRandom | Predictable random for deterministic tests |
try_all_permutations() | Test all permutations of inputs |
withCallbackLogger() | Track callback invocations |
mockBehaviours() | Behavior mocking |
packages/tinytest)Meteor's built-in test framework.
Tinytest.add('my test', function (test) {
test.equal(1 + 1, 2);
test.isTrue(true);
test.throws(function () { throw new Error(); });
});
Tinytest.addAsync('async test', async function (test) {
const result = await asyncOperation();
test.equal(result, expected);
});
| Variable | Description |
|---|---|
TEST_METADATA | Test configuration JSON |
METEOR_TEST_PACKAGES | Packages to test |
# Verbose build output
METEOR_DEBUG_BUILD=1 ./meteor run
# Profile build performance
METEOR_PROFILE=1 ./meteor build
# Force rebuild
./meteor reset && ./meteor run
# Debug Meteor tool with Chrome inspector
TOOL_NODE_FLAGS="--inspect-brk" ./meteor
In package.js:
Package.onTest(function(api) {
api.use(['tinytest', 'test-helpers', 'my-package']);
api.addFiles('my-package-tests.js');
});
In my-package-tests.js:
import { MyPackage } from 'meteor/my-package';
Tinytest.add('MyPackage - basic functionality', function (test) {
const result = MyPackage.doSomething();
test.equal(result, expected);
});