mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
Bulk rename across 989 files: - Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc. - Repository URLs: posthog/posthog-js → hanzoai/insights-js - Brand names: PostHog → Insights - File renames: 259 reference JSON files, source files, workflow files - Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
module.exports = {
|
|
collectCoverage: true,
|
|
clearMocks: true,
|
|
fakeTimers: { enableGlobally: true },
|
|
coverageDirectory: 'coverage',
|
|
silent: true,
|
|
verbose: false,
|
|
extensionsToTreatAsEsm: ['.ts'],
|
|
roots: ['<rootDir>/src', '<rootDir>/../../examples/example-convex/convex'],
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
// Ensure example integration tests resolve @insights/convex from the
|
|
// workspace source rather than from the example's tarball node_modules.
|
|
'^@insights/convex/test$': '<rootDir>/src/test',
|
|
'^@insights/convex/convex\\.config(\\.js)?$': '<rootDir>/dist/component/convex.config',
|
|
'^@insights/convex$': '<rootDir>/src/client/index',
|
|
},
|
|
transform: {
|
|
// .ts files: keep ESM imports (modules: false) for jest ESM mode
|
|
'^.+\\.tsx?$': [
|
|
'babel-jest',
|
|
{
|
|
configFile: false,
|
|
presets: [['@babel/preset-env', { targets: { node: '20.0' }, modules: false }], '@babel/preset-typescript'],
|
|
plugins: ['./babel-plugin-import-meta-glob.cjs'],
|
|
},
|
|
],
|
|
// .js files (e.g. _generated/): convert ESM to CJS
|
|
'^.+\\.js$': [
|
|
'babel-jest',
|
|
{
|
|
configFile: false,
|
|
presets: [['@babel/preset-env', { targets: { node: '20.0' } }]],
|
|
},
|
|
],
|
|
},
|
|
// src/test.ts is a test helper, not a test suite
|
|
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/src/test\\.ts$'],
|
|
}
|