Files
zeekay e43ab1afe7 chore: rename all PostHog references to Insights/Hanzo
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)
2026-03-06 01:41:12 -08:00

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$'],
}