Skip to content

Front-end tests are difficult to enable #88

@glebec

Description

@glebec

FSG by default loads the home state upon initialization. This makes it difficult to unit test components. To have working front-end tests, students must either:

  • Architect all their services as belonging to a standalone Angular module, à la fsgPrebuilt.
  • Use a preprocessor and accept that the home state + all its dependencies are going to be bootstrapped (bad idea)
  • Add a testing harness that detects the node environment, sets some window flags, and configures the app accordingly (probably the easiest).

This is, of course, specific to Angular and we are probably going to abandon Angular-FSG for React-FSG. However if we continue to use the Angular version of this app, we should probably implement the third option above to make it easier on students.

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