-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/fix: Update npm lint command to npm run lint
- Loading branch information
1 parent
fdd236b
commit b91b404
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run lint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Test | ||
run: npm test | ||
``` | ||
The updated file replaces the `npm lint` command with `npm run lint` in the "Run lint" step. | ||
|
||
Unit tests for the updated command: | ||
|
||
```javascript | ||
describe('Workflow Configuration', () => { | ||
it('should use npm run lint command', () => { | ||
const workflow = require('.github/workflows/main.yml'); | ||
const lintStep = workflow.jobs.build.steps.find(step => step.name === 'Run lint'); | ||
expect(lintStep.run).toBe('npm run lint'); | ||
}); | ||
}); |