mirror of
https://github.com/ever-co/ever-gauzy.git
synced 2026-10-02 01:54:50 +08:00
Once the Angular suites loaded, most failures were CLI-generated `should create` stubs that had never run, failing on the first injection (TranslateService, NbToastrService, NbDialogRef, ActivatedRoute, the translate pipe, the default icon pack). - jest.angular-defaults.ts (setupFilesAfterEnv, after each project's test-setup): a top-level beforeEach adds what the app's root module provides - TranslateModule.forRoot, the Nebular forRoot modules, NgxPermissionsModule.forRoot, the Tabler/eva icon pack, HttpClient testing, router, noop animations, a NbDialogRef stub, GAUZY_ENV - and a matchMedia stand-in (jsdom has none). configureTestingModule merges, so a spec's own providers still win. It imports no ui-core/core: that would cache real modules a spec later jest.mock()s. - jest.preset.js maps dayjs/esm (imported by ngx-daterangepicker-material's .mjs bundle) to dayjs's CommonJS build. - Specs of non-standalone components import the NgModule that declares them, provide what the host feature module provides (EmployeesService, AuthService, NbAuthModule.forRoot, PipesModule), and set the inputs / route data / date-picker config the app always supplies before render. - Two stubs imported classes their files do not export (GauzyRangePickerComponent, ViewComponent) and declared `undefined`. - desktop-ui-lib's test-setup installs an inert `window.electronAPI` preload bridge of the shape apps/agent exposes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
256 lines
5.3 KiB
JSON
256 lines
5.3 KiB
JSON
{
|
|
"namedInputs": {
|
|
"default": [
|
|
"{projectRoot}/**/*",
|
|
"sharedGlobals",
|
|
"{workspaceRoot}/angular.json",
|
|
"{workspaceRoot}/nx.json",
|
|
"{workspaceRoot}/tsconfig.base.json"
|
|
],
|
|
"sharedGlobals": [
|
|
"{workspaceRoot}/package.json",
|
|
"{workspaceRoot}/tsconfig.json",
|
|
"{workspaceRoot}/.eslintrc.json",
|
|
"{workspaceRoot}/.env",
|
|
"{workspaceRoot}/.env.local",
|
|
{
|
|
"runtime": "node -p process.platform"
|
|
},
|
|
{
|
|
"runtime": "node -p process.arch"
|
|
},
|
|
{
|
|
"runtime": "node -p process.versions.node"
|
|
},
|
|
{
|
|
"env": "NODE_ENV"
|
|
}
|
|
],
|
|
"production": [
|
|
"default",
|
|
"!{projectRoot}/**/*.spec.ts",
|
|
"!{projectRoot}/**/*.test.ts"
|
|
]
|
|
},
|
|
"cli": {
|
|
"warnings": {
|
|
"typescriptMismatch": false,
|
|
"versionMismatch": false
|
|
},
|
|
"packageManager": "yarn",
|
|
"analytics": false,
|
|
"defaultCollection": "@nstudio/xplat"
|
|
},
|
|
"generators": {
|
|
"@nx/angular": {
|
|
"application": {
|
|
"linter": "eslint",
|
|
"style": "scss",
|
|
"unitTestRunner": "jest",
|
|
"e2eTestRunner": "cypress",
|
|
"strict": true
|
|
},
|
|
"library": {
|
|
"linter": "eslint",
|
|
"style": "scss",
|
|
"unitTestRunner": "jest",
|
|
"buildable": true,
|
|
"publishable": false,
|
|
"strict": true
|
|
},
|
|
"component": {
|
|
"style": "scss",
|
|
"changeDetection": "OnPush",
|
|
"prefix": "ngx",
|
|
"inlineStyle": false,
|
|
"inlineTemplate": false,
|
|
"skipTests": false
|
|
},
|
|
"directive": {
|
|
"prefix": "ngx",
|
|
"skipTests": false,
|
|
"type": "directive"
|
|
},
|
|
"service": {
|
|
"skipTests": false,
|
|
"type": "service"
|
|
},
|
|
"pipe": {
|
|
"skipTests": false,
|
|
"typeSeparator": "."
|
|
},
|
|
"module": {
|
|
"skipTests": false,
|
|
"typeSeparator": "."
|
|
},
|
|
"storybook-configuration": {
|
|
"linter": "eslint",
|
|
"configureCypress": true,
|
|
"generateCypressSpecs": true
|
|
},
|
|
"scam": {
|
|
"type": "component"
|
|
},
|
|
"scam-directive": {
|
|
"type": "directive"
|
|
},
|
|
"guard": {
|
|
"typeSeparator": "."
|
|
},
|
|
"interceptor": {
|
|
"typeSeparator": "."
|
|
},
|
|
"resolver": {
|
|
"typeSeparator": "."
|
|
}
|
|
},
|
|
"@nx/angular:application": {
|
|
"e2eTestRunner": "none",
|
|
"linter": "eslint",
|
|
"style": "css",
|
|
"unitTestRunner": "jest"
|
|
},
|
|
"@nx/angular:library": {
|
|
"linter": "eslint",
|
|
"unitTestRunner": "jest"
|
|
},
|
|
"@nx/angular:component": {
|
|
"style": "css",
|
|
"type": "component"
|
|
},
|
|
"@schematics/angular:component": {
|
|
"type": "component"
|
|
},
|
|
"@schematics/angular:directive": {
|
|
"type": "directive"
|
|
},
|
|
"@schematics/angular:service": {
|
|
"type": "service"
|
|
},
|
|
"@schematics/angular:guard": {
|
|
"typeSeparator": "."
|
|
},
|
|
"@schematics/angular:interceptor": {
|
|
"typeSeparator": "."
|
|
},
|
|
"@schematics/angular:module": {
|
|
"typeSeparator": "."
|
|
},
|
|
"@schematics/angular:pipe": {
|
|
"typeSeparator": "."
|
|
},
|
|
"@schematics/angular:resolver": {
|
|
"typeSeparator": "."
|
|
}
|
|
},
|
|
"defaultProject": "gauzy",
|
|
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
|
"parallel": 8,
|
|
"targetDefaults": {
|
|
"build": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
},
|
|
"lint": {
|
|
"cache": true
|
|
},
|
|
"test": {
|
|
"cache": true
|
|
},
|
|
"e2e": {
|
|
"cache": true
|
|
},
|
|
"@nx/eslint:lint": {
|
|
"cache": true,
|
|
"inputs": [
|
|
"default",
|
|
"{workspaceRoot}/.eslintrc.json",
|
|
"{workspaceRoot}/tools/eslint-rules/**/*"
|
|
]
|
|
},
|
|
"@nx/jest:jest": {
|
|
"cache": true,
|
|
"inputs": [
|
|
"default",
|
|
"^production",
|
|
"{workspaceRoot}/jest.preset.js",
|
|
"{workspaceRoot}/jest.resolver.js",
|
|
"{workspaceRoot}/jest.interop.js",
|
|
"{workspaceRoot}/jest.angular-defaults.ts"
|
|
],
|
|
"options": {
|
|
"passWithNoTests": true
|
|
},
|
|
"configurations": {
|
|
"ci": {
|
|
"ci": true,
|
|
"codeCoverage": true
|
|
}
|
|
}
|
|
},
|
|
"@nx/angular:package": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
},
|
|
"@nx/webpack:webpack": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
},
|
|
"@nx/js:tsc": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
},
|
|
"@angular-devkit/build-angular:application": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
},
|
|
"@nx/angular:ng-packagr-lite": {
|
|
"cache": true,
|
|
"dependsOn": [
|
|
"^build"
|
|
],
|
|
"inputs": [
|
|
"production",
|
|
"^production"
|
|
]
|
|
}
|
|
},
|
|
"useInferencePlugins": false,
|
|
"useDaemon": true,
|
|
"defaultBase": "develop",
|
|
"release": {
|
|
"version": {
|
|
"preVersionCommand": "yarn nx run-many -t build"
|
|
}
|
|
}
|
|
} |