Registry / testing / seneca-error-test

seneca-error-test

JSON →
library0.2.2jsnpmunverified

seneca-error-test is an internal utility package primarily designed for testing error handling mechanisms within the Seneca microservices framework. Released at version 0.2.2, it explicitly states compatibility with Node.js 0.10.31 and Seneca 0.6.0. These are very old versions of both Node.js and Seneca, indicating that the package has not seen active development or maintenance for many years. Consequently, it is highly unlikely to be compatible with modern Node.js versions (v14+) or current stable releases of Seneca (v3+). Its release cadence is effectively zero, as it has remained at 0.2.2 since its initial publication. As an internal test utility, it offers minimal user-facing functionality beyond its specific testing purpose, serving more as a historical artifact or a reference for older Seneca implementations rather than a viable tool for contemporary projects. Its use in new projects is strongly discouraged due to potential compatibility issues and lack of security updates.

npm install seneca-error-test
INSTALL
IMPORT
SIG · SENECA-ERROR-TEST
S
seneca-error-test
testingjavascriptv0.2.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

senecaErrorTestPlugin
const senecaErrorTestPlugin = require('seneca-error-test')
This package exports a CommonJS function intended to be registered as a Seneca plugin. It is not an ES module.

Demonstrates initializing a Seneca instance, loading the seneca-error-test plugin, and invoking a 'fail' command to catch an expected error.

const Seneca = require('seneca') const senecaErrorTestPlugin = require('seneca-error-test') async function runErrorTest() { const seneca = Seneca({ log: 'silent' }) // Register the error test plugin seneca.use(senecaErrorTestPlugin) try { // Call a command designed to fail const result = await seneca.post('role:error-test,cmd:fail') console.log('Unexpected success:', result) } catch (err) { console.error('Caught expected error:', err.message) } try { // Call a command that returns an error object const result = await seneca.post('role:error-test,cmd:errobj,arg:testvalue') // In older Seneca, this might not throw but return an object with error properties console.log('Result from errobj (may contain error details):', result) } catch (err) { console.error('Caught error from errobj:', err.message) } await seneca.close() } runErrorTest()
Debug
Known issues
breakingThis package was explicitly tested with Node.js 0.10.31 and Seneca 0.6.0. It is highly incompatible with modern Node.js versions (v14+) and Seneca versions (v3+) due to significant API changes and JavaScript syntax evolution.
fix
Do not use this package in new projects or with modern environments. Consider creating a new test utility specific to your current Seneca version.
affects: >=0.2.2
deprecatedThe package has not been updated since its 0.2.2 release and is effectively abandoned. There is no active maintenance, bug fixes, or security patches planned.
fix
Migrate away from this package. If its functionality is required, reimplement it for your current Seneca setup.
affects: >=0.2.2
gotchaUsing this package with newer Seneca instances may lead to silent failures, unexpected behavior, or TypeErrors due to deprecated Seneca API calls (e.g., `seneca.add` signatures).
fix
Thoroughly test any integration with modern Seneca. Expect refactoring or complete replacement to be necessary.
affects: >=0.2.2
Errors
Common errors & fixes
TypeError: seneca.add is not a function
Attempting to use an old version of the Seneca framework, or an old plugin with a newer Seneca instance where the `seneca.add` signature has changed significantly.
fix
Ensure your `seneca` package version matches the expectations of the plugin (Seneca 0.6.0 for this package). For modern Seneca, you cannot directly use this plugin without modification.
ERR_REQUIRE_ESM: require() of ES Module ... not supported
While this package is CommonJS, if it were part of a larger project attempting to use ESM-only dependencies or being imported into an ESM context without proper transpilation/bundling, this error could occur.
fix
Ensure your project is configured for CommonJS if using old packages, or use a bundler that handles CJS to ESM conversion if necessary. For this package, directly `require()`ing it is the intended method.
Cannot find module 'seneca-error-test'
The package is not installed, or the path in `require()` is incorrect.
fix
Run `npm install seneca-error-test` or `yarn add seneca-error-test` to install it.
Upgrade
Version history
0.2.2latest on npm
Audit
Dependencies
senecarequiredThis package is a Seneca plugin and requires the Seneca framework to function. It was tested against Seneca 0.6.0.
Agent activity
10 hits · last 30 days
node
8
Resources
seneca-error-test — npm install seneca-error-test · libregistry