Home > Net >  Cypress picking up spec files
Cypress picking up spec files

Time:02-03

Cypress seems to be incorrectly picking up my Jasmine spec files when running component tests:

enter image description here

enter image description here

I import the Account Service into my toolbar.component.cy.ts component so that I can add it to the providers array: enter image description here

This is the config for Cypress:

import { defineConfig } from "cypress";

export default defineConfig({
  component: {
    devServer: {
      framework: "angular",
      bundler: "webpack",
    },
    specPattern: "**/*.cy.ts",
  }
});

Has anyone else had this issue before? If so, how do you fix it?!

CodePudding user response:

Answered in a comment, but as we learned, it looks like you had the file imported at the top of your test file. :)

  • Related