-
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.
- Loading branch information
Showing
5 changed files
with
1,986 additions
and
13 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,39 @@ | ||
name: Linting and Testing | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Run ESLint | ||
run: yarn lint | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Run tests | ||
run: yarn test |
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,13 @@ | ||
{ | ||
"transform": { | ||
"^.+\\.ts$": "ts-jest" | ||
}, | ||
"modulePaths": ["<rootDir>/src"], | ||
"testRegex": "tests/.*\\.tests?\\.ts$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"js", | ||
"json", | ||
"node" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -3,15 +3,24 @@ | |
"version": "0.1.0", | ||
"description": "REST API for ACM at UCSD's hackathon portal.", | ||
"main": "index.js", | ||
"scripts": { | ||
"build": "tsc", | ||
"test": "jest --config jest.config.json --runInBand", | ||
"lint": "eslint ./ --ext .ts", | ||
"lint:fix": "eslint ./ --ext .ts --fix" | ||
}, | ||
"repository": "https://github.com/acmucsd/hackathon-portal.git", | ||
"author": "Eric Chang <[email protected]>", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.13", | ||
"@typescript-eslint/eslint-plugin": "^7.0.0", | ||
"@typescript-eslint/parser": "^7.0.0", | ||
"eslint": "^8.57.1", | ||
"eslint-config-airbnb-typescript": "^18.0.0", | ||
"eslint-plugin-import": "^2.31.0", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.2.5", | ||
"typescript": "^5.6.3" | ||
} | ||
} |
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,17 @@ | ||
describe('dummy test', () => { | ||
test('dummy test case always passes', () => { | ||
expect(1 + 1).toBe(2); | ||
}); | ||
}); | ||
|
||
describe('dummy test', () => { | ||
test('another dummy test case always passes', () => { | ||
expect(1 + 2).toBe(3); | ||
}); | ||
}); | ||
|
||
describe('dummy test', () => { | ||
test('dummy test will fail', () => { | ||
expect(1 + 1).toBe(0); | ||
}); | ||
}); |
Oops, something went wrong.