test: add Jest configuration and fix test path resolution
- Add jest.config.js with proper Node.js environment configuration - Fix train.test.js to use correct relative path: '../../js/train.js' - Add module.exports to train.js for Node.js module loading - Update package.json with proper test scripts (test:unit, test:e2e, test:coverage)
This commit is contained in:
@@ -223,3 +223,7 @@ if (typeof window !== 'undefined') {
|
||||
window.Train = Train;
|
||||
window.TrainController = TrainController;
|
||||
}
|
||||
|
||||
// Export for Node.js/Jest
|
||||
module.exports = { Train, TrainController };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user