iJS Angular Testing Cheat Sheet

International Javascript Conference

Angular Testing Cheat Sheet

Our cheat sheet (written by Karsten Sitterberg) grasps the basic principles of Angular testing with different setups: Jasmine/Karma, Jest, Jasmine/Protractor and Cypress.

Register for the iJS newsletter to receive Angular Testing Cheat Sheet:

Table of content

    • Characteristics

    • Basic test for Angular component

    • Enable snapshot tests

    • Install dependencies

    • Create “src/jestGlobal.ts”

    • Edit files

    • Create mocks/spies with Jasmine

    • Create mocks/spies with Jest

    • Page object (“app.po.ts”)

    • Basic test in Protractor

    • Cypress setup

    • Edit “package.json”

    • Basic test in Cypress