diff --git a/.github/workflows/sanity-check.yml b/.github/workflows/sanity-check.yml new file mode 100644 index 0000000..c38281b --- /dev/null +++ b/.github/workflows/sanity-check.yml @@ -0,0 +1,22 @@ +name: PR Sanity Check + +on: + +jobs: + lint: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Packages + run: | + npm install + + - name: Lint check + run: | + npm run lint + + - name: Lint check + run: | + npm run test diff --git a/eslint.config.mjs b/eslint.config.mjs index b32b314..cd28111 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -14,6 +14,7 @@ export default defineConfig([ rules: { "prefer-const": "error", "no-unused-vars": "error", + "no-console": "error", "semi": "error", }, }, diff --git a/src/sum.test.js b/src/sum.test.js index 1d4044a..72f0f84 100644 --- a/src/sum.test.js +++ b/src/sum.test.js @@ -2,6 +2,6 @@ import { sum } from './sum'; describe('sum', () => { it('return sum of two numbers', () => { - expect(sum(2, 3)).toEqual(5); + expect(sum(2, 3)).toEqual(6); }); });