From fb883e47b3bf5180cbea8fef37901eb2cbd84bf0 Mon Sep 17 00:00:00 2001 From: jaornelas Date: Tue, 8 Apr 2025 18:19:57 -0500 Subject: [PATCH 1/6] create .github directory and add yml file --- .github/workflows/main.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..e69de29b From 32519ab857b3b3f38b974ca01b6619f433c4f957 Mon Sep 17 00:00:00 2001 From: jaornelas Date: Tue, 8 Apr 2025 19:05:54 -0500 Subject: [PATCH 2/6] fix calculator issue --- .github/workflows/main.yml | 43 +++++++++++++++++++++++++++++++++++ src/components/Calculator.tsx | 1 + 2 files changed, 44 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e69de29b..5a031531 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +# Name of workflow +name: Lint workflow + +# Trigger workflow on all pull requests +on: + pull_request: + branches: + - develop + - staging + +# Jobs to carry out +jobs: + test: + # Operating system to run job on + runs-on: ubuntu-latest + + # Steps in job + steps: + # Get code from repo + - name: Checkout code + uses: actions/checkout@v1 + + - name: Use Node.js 21.x + uses: actions/setup-node@v1 + with: + node-version: 21.x + + # Install dependencies + - name: 🧰 Install Deps + run: npm install + + # Run lint + - name: Run Lint + run: npm run lint + + # Run build + - name: Run Build + run: npm run build + + # Run tests + - name: Run Tests + run: npm run test + \ No newline at end of file diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index bfac7800..9040d335 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -15,6 +15,7 @@ export default function Calculator() { return (
+

Simple Calculator

Date: Tue, 8 Apr 2025 19:11:58 -0500 Subject: [PATCH 3/6] add comment --- src/tests/__snapshots__/Calculator.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/__snapshots__/Calculator.test.tsx.snap b/src/tests/__snapshots__/Calculator.test.tsx.snap index 42348f09..1f9fcf86 100644 --- a/src/tests/__snapshots__/Calculator.test.tsx.snap +++ b/src/tests/__snapshots__/Calculator.test.tsx.snap @@ -1,5 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - +//adding a comment for changes exports[`Calculator > should match snapshot 1`] = ` "

Simple Calculator

From bb2705af552a66de18ef7df6cf8ba9d00d3fc43e Mon Sep 17 00:00:00 2001 From: jaornelas Date: Tue, 8 Apr 2025 20:05:48 -0500 Subject: [PATCH 4/6] add comment --- src/components/Calculator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index 9040d335..bfc77bb9 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -4,7 +4,7 @@ interface CalculatorState { total: number; previousTotal: number; } - +//calculator function export default function Calculator() { const [calcState, setCalcState] = useState({ total: 0, previousTotal: 0 }); const [value, setValue] = useState(0); From 0c2e42649883a08c5f8b7a3102c124f552df9c6b Mon Sep 17 00:00:00 2001 From: jaornelas Date: Tue, 8 Apr 2025 20:08:15 -0500 Subject: [PATCH 5/6] more comment --- src/components/Calculator.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Calculator.tsx b/src/components/Calculator.tsx index bfc77bb9..60e08ce5 100644 --- a/src/components/Calculator.tsx +++ b/src/components/Calculator.tsx @@ -5,6 +5,7 @@ interface CalculatorState { previousTotal: number; } //calculator function +//comment comment export default function Calculator() { const [calcState, setCalcState] = useState({ total: 0, previousTotal: 0 }); const [value, setValue] = useState(0); From 59ed2a79542e04c7865cfd98d2bfdc45fae1e6e1 Mon Sep 17 00:00:00 2001 From: jaornelas Date: Tue, 8 Apr 2025 20:11:18 -0500 Subject: [PATCH 6/6] remove dumb semi colon --- src/components/Advertisement.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Advertisement.tsx b/src/components/Advertisement.tsx index 2181f6aa..bb55bcb2 100644 --- a/src/components/Advertisement.tsx +++ b/src/components/Advertisement.tsx @@ -2,7 +2,7 @@ interface AdvertisementProps { companyName: string; productDescription: string; price: string; -}; +} function Advertisement(props: AdvertisementProps) { return (