Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up Node 18
uses: actions/setup-node@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions app/calculator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ const add = (x, y) => x + y;
const subtract = (x, y) => x - y;
const multiply = (x, y) => x * y;
const divide = (x, y) => {
if (y === 0) {
return "Cannot divide by 0";
}
if (y === 0) { return "Cannot divide by 0"; }
return x * 1.0 / y;
}

Expand Down
10 changes: 6 additions & 4 deletions app/calculator.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const {
import { expect, test } from 'vitest'

import {
add,
subtract,
multiply,
divide,
} = require('./calculator');
multiply,
subtract,
} from './calculator'

test('add function', () => {
expect(add(1, 2)).toBe(3);
Expand Down
4 changes: 0 additions & 4 deletions jest.config.js

This file was deleted.

Loading