Skip to content

Commit

Permalink
fixing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nmesoma01 committed Jul 25, 2024
1 parent c6ef637 commit 8b7ea52
Show file tree
Hide file tree
Showing 8 changed files with 1,796 additions and 94 deletions.
39 changes: 24 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
module.exports = {
env: {
browser: true,
es2021: true,
"env": {
"browser": true,
"es2021": true,
"node": true,
"jest": true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'airbnb',
"extends": "airbnb-base",
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
}
}
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
rules: {
// Customize your ESLint rules here
},
};

"rules": {
}
}
3 changes: 2 additions & 1 deletion .github/workflows/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module.exports = {
"env": {
"browser": true,
"es2021": true,
"node": true
"node": true,
"jest": true,
},
"extends": "airbnb-base",
"overrides": [
Expand Down
7 changes: 7 additions & 0 deletions __tests__/sum.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// sum.test.js
import { sum } from '../src/sum';

test('adds 1 + 2 to equal 3', () => {

Check failure on line 4 in __tests__/sum.test.js

View workflow job for this annotation

GitHub Actions / build

'test' is not defined
expect(sum(1, 2)).toBe(3);

Check failure on line 5 in __tests__/sum.test.js

View workflow job for this annotation

GitHub Actions / build

'expect' is not defined
});

6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
'@babel/preset-env'
],
};

3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*/

module.exports = {
transform: {
'^.+\\.js$': 'babel-jest',
},
testEnvironment: 'node',
};

Expand Down
Loading

0 comments on commit 8b7ea52

Please sign in to comment.