Skip to content

Minification in Tests #702

@rschneiderman39

Description

@rschneiderman39

My tests rely on the use of the name of a class in order to substitute mocks for services being injected into the component under test.

Something in the Karma config (mine is the same as the one in this repository) is minifying the entire codebase before running the tests which is causing class names to be 'minified' to single characters. For example, 'ErrorHandlingService' class is renamed to 't'.

I have tried editing the webpack config and the Karma config to set the optimization > minimize property to false but nothing changes. I am running webpack in 'development' mode when running my Karma tests.

Has anyone else encountered this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions