mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-03 05:19:45 -06:00
refactor: improve angular mount log and override build options for dev (#22955)
This commit is contained in:
@@ -212,14 +212,17 @@ export function mount<T extends object> (
|
||||
const fixture = setupFixture(component, testBed, autoDetectChanges)
|
||||
const componentInstance = setupComponent(config, fixture)
|
||||
|
||||
const mountResponse: MountResponse<T> = {
|
||||
testBed,
|
||||
fixture,
|
||||
component: componentInstance,
|
||||
}
|
||||
|
||||
Cypress.log({
|
||||
name: 'mount',
|
||||
message: component.name,
|
||||
consoleProps: () => ({ result: mountResponse }),
|
||||
})
|
||||
|
||||
return cy.wrap({
|
||||
fixture,
|
||||
testBed,
|
||||
component: componentInstance,
|
||||
}, { log: false })
|
||||
return cy.wrap(mountResponse, { log: false })
|
||||
}
|
||||
|
||||
@@ -85,9 +85,7 @@ export function getAngularBuildOptions (projectConfig: AngularJsonProjectConfig,
|
||||
assets: [],
|
||||
styles: [],
|
||||
scripts: [],
|
||||
budgets: [],
|
||||
fileReplacements: [],
|
||||
outputHashing: 'all',
|
||||
inlineStyleLanguage: 'css',
|
||||
stylePreprocessorOptions: { includePaths: [] },
|
||||
resourcesOutputPath: undefined,
|
||||
@@ -121,6 +119,8 @@ export function getAngularBuildOptions (projectConfig: AngularJsonProjectConfig,
|
||||
...projectConfig.architect.build.configurations?.development || {},
|
||||
tsConfig,
|
||||
aot: false,
|
||||
outputHashing: 'none',
|
||||
budgets: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ const expectLoadsAngularBuildOptions = () => {
|
||||
expect(buildOptions.aot).to.be.false
|
||||
expect(buildOptions.optimization).to.be.false
|
||||
expect(buildOptions.tsConfig).to.equal(tsConfig)
|
||||
expect(buildOptions.outputHashing).to.equal('none')
|
||||
expect(buildOptions.budgets).to.be.undefined
|
||||
|
||||
const modifiedProjectConfig = cloneDeep(projectConfig)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user