mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 19:32:30 +08:00
106a5d36ed
* Implement StreamEmbed instance and rename library to coral * Add article & articleButton.html, only show embed htmls in production * Respect assetURL * Add tests * Add parseHashQuery * Fix permalink query and integration tests * Fix permalink URL * Remove optionalparams from pym * Scroll when showing permalink view * Implement autoRender * AutoRender immediately when render permalink * Add test for `showPermalink` event * Add comment
45 lines
1.6 KiB
JavaScript
45 lines
1.6 KiB
JavaScript
const path = require("path");
|
|
|
|
module.exports = {
|
|
displayName: "client",
|
|
rootDir: "../../",
|
|
roots: ["<rootDir>/src/core/client"],
|
|
collectCoverageFrom: ["**/*.{js,jsx,mjs,ts,tsx}"],
|
|
coveragePathIgnorePatterns: ["/node_modules/"],
|
|
setupFiles: [
|
|
"<rootDir>/src/core/build/polyfills.js",
|
|
"<rootDir>/src/core/client/test/setup.ts",
|
|
],
|
|
setupTestFrameworkScriptFile:
|
|
"<rootDir>/src/core/client/test/setupTestFramework.ts",
|
|
testMatch: ["**/*.spec.{js,jsx,mjs,ts,tsx}"],
|
|
testEnvironment: "node",
|
|
testURL: "http://localhost",
|
|
transform: {
|
|
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest",
|
|
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
|
|
"^.+\\.ftl$": "<rootDir>/config/jest/contentTransform.js",
|
|
"^(?!.*\\.(js|jsx|mjs|ts|tsx|css|json|ftl)$)":
|
|
"<rootDir>/config/jest/fileTransform.js",
|
|
},
|
|
transformIgnorePatterns: [
|
|
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|ts|tsx)$",
|
|
],
|
|
moduleNameMapper: {
|
|
"^talk-admin/(.*)$": "<rootDir>/src/core/client/admin/$1",
|
|
"^talk-auth/(.*)$": "<rootDir>/src/core/client/auth/$1",
|
|
"^talk-ui/(.*)$": "<rootDir>/src/core/client/ui/$1",
|
|
"^talk-stream/(.*)$": "<rootDir>/src/core/client/stream/$1",
|
|
"^talk-framework/(.*)$": "<rootDir>/src/core/client/framework/$1",
|
|
"^talk-common/(.*)$": "<rootDir>/src/core/common/$1",
|
|
},
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "ftl"],
|
|
snapshotSerializers: ["enzyme-to-json/serializer"],
|
|
globals: {
|
|
"ts-jest": {
|
|
useBabelrc: true,
|
|
tsConfigFile: path.resolve(__dirname, "tsconfig.jest.json"),
|
|
},
|
|
},
|
|
};
|