MySQL emulator that runs entirely in Node.js without a real MySQL server, designed for end-to-end testing. Current version 0.1.0 is in active development with known limitations (no RIGHT JOIN, no timezone support, partial INFORMATION_SCHEMA). It integrates with Sequelize 6+ and TypeORM 0.3+ via peer dependencies, supporting common SQL operations including SELECT, INSERT, UPDATE, DELETE, foreign key constraints, and basic functions. Unlike MySQL mock libraries that only intercept queries, this emulator parses and executes SQL internally, providing more realistic behavior for e2e tests.
npm install mysql-emulatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MySQL emulator connection, creates a table, inserts a row, and queries it, demonstrating basic SQL execution.
Rewrite queries using LEFT JOIN or other workarounds.
Avoid relying on INFORMATION_SCHEMA for introspection; use explicit schema queries.
Add explicit ORDER BY to your queries.
Use column aliases to normalize names.
Manually convert timezones in application logic.
Run npm install mysql-emulator
Use import syntax instead of require()
Rewrite query with LEFT JOIN
Use consistent quoting or aliases