Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
configureTesting
✓ import { configureTests } from 'velocious/build/src/testing/test.js'
✗ import { configureTests } from 'velocious'
Configuration for testing needs to be imported from a specific internal path, not directly from the main package export. The `configureTests` function is used for global test settings like excluding tags.
testEvents
✓ import { testEvents } from 'velocious/build/src/testing/test.js'
✗ import { testEvents } from 'velocious'
Event emitter for test lifecycle hooks (e.g., retries) is also found at the internal testing module path. This allows for custom actions during test execution.
configuration
✓ import configuration from 'src/config/configuration.js'
✗ import { configuration } from 'velocious'
Application configuration is typically managed by a default export from a `src/config/configuration.js` file, which needs to be explicitly set as the current configuration using `configuration.setCurrent()`.
Demonstrates project initialization, basic test structure with tagging, retries, and configuring test behaviors, including event listeners for test retries.
import { configureTests } from 'velocious/build/src/testing/test.js';
import { testEvents } from 'velocious/build/src/testing/test.js';
// Initialize a new Velocious project
// This creates basic project structure and config files.
// npx velocious init
// Example test configuration
export default async function configureTesting() {
configureTests({ excludeTags: ["mssql"] });
}
// Example of test suite setup with tagging and retries
describe("User Management", {tags: ["api", "db"]}, () => {
beforeAll(async () => {
// Setup database or other services before all tests in this suite
console.log("Setting up user management suite...");
});
it("creates a new user successfully", {tags: ["fast", "write"]}, async () => {
// Simulate user creation logic
await new Promise(resolve => setTimeout(resolve, 50));
expect(true).toBe(true);
});
it("handles duplicate username registration", {retry: 1}, async () => {
// Simulate error handling for duplicates
await new Promise(resolve => setTimeout(resolve, 30));
expect(false).toBe(false);
});
afterAll(async () => {
// Teardown services after all tests
console.log("Tearing down user management suite.");
});
});
// Listen for test retry events
testEvents.on("testRetrying", ({ testDescription, nextAttempt }) => {
console.log(`Retrying "${testDescription}" (attempt ${nextAttempt})`);
});
testEvents.on("testRetried", ({ testDescription, attemptNumber }) => {
console.log(`Retry attempt finished for "${testDescription}" (attempt ${attemptNumber})`);
});
// To run these tests: npx velocious test spec/path/to/your-test-spec.js
velocious --version
Errors
Common errors & fixes
Error: Cannot find module 'velocious' or Cannot find module 'velocious/build/src/testing/test.js'
Incorrect import path or the package was not installed correctly.
fixEnsure `npm install velocious` has completed successfully. Verify the import paths are exact, especially for internal modules like `velocious/build/src/testing/test.js`.
No tests found for the given criteria
Incorrect test file naming convention, tag filtering, or test path specification.
fixBrowser tests must be `*.browser-test.js` or `*.browser-spec.js`. Check `npx velocious test --tag` and `npx velocious test --exclude-tag` arguments, and ensure the file path is correct. Use `--groups` and `--group-number` carefully for parallel runs.
ReferenceError: configuration is not defined
The application's configuration object was not properly imported or initialized using `configuration.setCurrent()` early enough in the application startup.
fixMake sure `src/config/configuration.js` exists and exports a default configuration, or explicitly import your configuration file and call `configuration.setCurrent(yourConfigObject)` at the very beginning of your application.
Audit
Dependencies
smtp-connectionrequiredPeer dependency likely used for email-related functionalities within the framework, such as sending notifications or transactional emails.