From 613677537697e747156f205cba8dc4dcbc378381 Mon Sep 17 00:00:00 2001 From: rafaelscosta Date: Fri, 8 May 2026 04:06:28 -0300 Subject: [PATCH] test(jest): resolve package-style core imports --- jest.config.js | 1 + tests/config/jest-module-mapper.test.js | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/config/jest-module-mapper.test.js diff --git a/jest.config.js b/jest.config.js index 7437f67981..f75403fbb4 100644 --- a/jest.config.js +++ b/jest.config.js @@ -129,6 +129,7 @@ module.exports = { roots: [''], moduleDirectories: ['node_modules', '.'], moduleNameMapper: { + '^aiox-core/(.*)$': '/.aiox-core/$1', '^@aiox-core/(.*)$': '/.aiox-core/$1', }, setupFilesAfterEnv: ['/tests/setup.js'], diff --git a/tests/config/jest-module-mapper.test.js b/tests/config/jest-module-mapper.test.js new file mode 100644 index 0000000000..21457dec45 --- /dev/null +++ b/tests/config/jest-module-mapper.test.js @@ -0,0 +1,10 @@ +'use strict'; + +describe('Jest moduleNameMapper', () => { + test('resolves package-style aiox-core imports to framework modules', () => { + const LayerProcessor = require('aiox-core/core/synapse/layers/layer-processor'); + + expect(typeof LayerProcessor).toBe('function'); + expect(LayerProcessor.name).toBe('LayerProcessor'); + }); +});