Skip to content

Commit e9309ce

Browse files
authored
Merge pull request #142 from mission-minded-llc/feat/cypress-typescript
fix: explicit jest expect import.
2 parents a45af36 + 4d3f46b commit e9309ce

File tree

96 files changed

+147
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+147
-34
lines changed

cypress.config.js renamed to cypress.config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
/// <reference types="cypress" />
2+
13
import fs from "fs";
24
import path from "path";
35

4-
const filePlugin = (on, config) => {
6+
const filePlugin = (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
57
on("task", {
6-
getMagicLink({ email }) {
8+
getMagicLink({ email }: { email: string }) {
79
// Convert email to safe filename
810
const safeEmail = email.replace(/[@.]/g, "_");
911
const tempDir = path.join(process.cwd(), ".cypress-temp");
@@ -23,7 +25,7 @@ const filePlugin = (on, config) => {
2325

2426
return magicLink;
2527
} catch (error) {
26-
throw new Error(`Error reading magic link for ${email}: ${error.message}`);
28+
throw new Error(`Error reading magic link for ${email}: ${(error as Error).message}`);
2729
}
2830
},
2931

@@ -51,7 +53,7 @@ const filePlugin = (on, config) => {
5153
const config = {
5254
e2e: {
5355
supportFile: "./cypress/support/e2e.ts",
54-
setupNodeEvents(on, config) {
56+
setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) {
5557
return filePlugin(on, config);
5658
},
5759
baseUrl: "http://localhost:3000",
@@ -60,7 +62,7 @@ const config = {
6062
TEST_EMAIL: process.env.CYPRESS_TEST_EMAIL || "[email protected]",
6163
},
6264
chromeWebSecurity: false,
63-
specPattern: "./cypress/**/*.cy.js",
65+
specPattern: "./cypress/**/*.cy.ts",
6466
},
6567
};
6668

cypress/integration/account/experience.cy.js renamed to cypress/integration/account/experience.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="cypress" />
2+
13
/**
24
* The Experience section is a complex section that allows users to add, edit, and delete companies
35
* and positions within those companies. It also allows users to add projects to positions.

cypress/integration/account/import.cy.js renamed to cypress/integration/account/import.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="cypress" />
2+
13
import getParsedResumeAiResponse from "./data/getParsedResumeAiResponse.json";
24

35
/**

cypress/integration/account/profile.cy.js renamed to cypress/integration/account/profile.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="cypress" />
2+
13
/**
24
* The Profile section is a simple section that allows users to edit their personal information
35
* including their name, slug, email, title, location, site title, and site description.

cypress/integration/account/skills.cy.js renamed to cypress/integration/account/skills.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="cypress" />
2+
13
/**
24
* The Skills section is a simple section that allows users to add, edit, and delete skills.
35
*/

cypress/integration/navigation/pdfWorkerSpec.cy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// <reference types="cypress" />
2+
23
import { expect } from "chai";
34

45
/**

package-lock.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "1.1.6",
44
"description": "Uniform standard for resume data.",
55
"private": true,
6-
"type": "module",
76
"keywords": [
87
"resume"
98
],
@@ -91,8 +90,10 @@
9190
"@types/react": "^19.1.8",
9291
"@types/react-color": "^3.0.13",
9392
"@types/react-dom": "^19.1.6",
93+
"@types/testing-library__jest-dom": "^5.14.9",
9494
"@typescript-eslint/parser": "^8.38.0",
9595
"babel-jest": "^30.0.1",
96+
"chai": "^6.0.1",
9697
"cypress": "^14.5.0",
9798
"eslint": "^9",
9899
"eslint-config-next": "^15.3.4",

src/app/about/privacy-policy/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "@testing-library/jest-dom";
2-
import React from "react";
32
import { render } from "@testing-library/react";
43
import PrivacyPolicy from "./page";
4+
import { expect } from "@jest/globals";
55

66
describe("PrivacyPolicy Page", () => {
77
it("matches snapshot", () => {

src/app/about/terms-of-service/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import "@testing-library/jest-dom";
2-
import React from "react";
32
import { render } from "@testing-library/react";
43
import TermsOfService from "./page";
4+
import { expect } from "@jest/globals";
55

66
describe("TermsOfService Page", () => {
77
it("matches snapshot", () => {

0 commit comments

Comments
 (0)