testing-utils
raw JSON → 1.0.0 verified Sat Apr 25 auth: no javascript deprecated
A placeholder package for test utilities currently in development. Version 1.0.0 is the initial release with minimal functionality. This package serves as a sandbox for testing workflows and is not recommended for production use.
Common errors
error Uncaught Error: createMock is not a function ↓
cause Import error: createMock is not exported from package (or is default export).
fix
Use correct import: import { createMock } from 'testing-utils'
error TypeError: testing_utils_1.default is not a function ↓
cause CommonJS require used on an ESM-only package.
fix
Use ESM import: import testingUtils from 'testing-utils'
error Error: Method not implemented. ↓
cause Package is WIP; functions are stubs.
fix
Do not use this package; choose an alternative.
Warnings
deprecated WIP status: package is incomplete and may be broken or removed without notice. ↓
fix Do not use in production; consider alternatives like jest.fn() or sinon.
gotcha ESM-only: package does not provide CommonJS exports. ↓
fix Use import syntax or use a bundler that supports ESM.
breaking No actual functionality: all utilities are unimplemented stubs that throw errors at runtime. ↓
fix Avoid using until package reaches stable release.
deprecated Package has been abandoned; no updates since initial release. ↓
fix Migrate to actively maintained testing utilities like vitest or @jest/globals.
Install
npm install testing-utils yarn add testing-utils pnpm add testing-utils Imports
- createMock
import { createMock } from 'testing-utils' - default wrong
const testingUtils = require('testing-utils')correctimport testingUtils from 'testing-utils' - render wrong
import render from 'testing-utils'correctimport { render } from 'testing-utils'
Quickstart
import { createMock } from 'testing-utils';
const mock = createMock();
mock();
console.log(mock.calls);