Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Project Page Project Page
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • Project PageProject Page
  • Merge requests
  • !54
An error occurred while fetching the assigned milestone of the selected merge_request.

add unit test (jest)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rosanny Sihombing requested to merge cherry-pick-c8c8abc3 into testing 4 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 6

(cherry picked from commit c8c8abc3)

  • Rosanny Sihombing @sihombing mentioned in commit eed337a5 4 years ago

    mentioned in commit eed337a5

  • Rosanny Sihombing @sihombing merged 4 years ago

    merged

  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • testing (base)

and
  • latest version
    1b7070f8
    1 commit, 4 years ago

6 files
+ 9782
- 2800

    Preferences

    File browser
    Compare changes
__t‎est‎
gitlab.‎test.ts‎ +12 -0
methods‎.test.ts‎ +16 -0
jest.co‎nfig.js‎ +4 -0
package-‎lock.json‎ +9743 -2797
packag‎e.json‎ +4 -1
tsconf‎ig.json‎ +3 -2
__test/gitlab.test.ts 0 → 100644
+ 12
- 0
  • View file @ 1b7070f8

  • Edit in single-file editor

  • Open in Web IDE

 
const gitlab = require('../functions/gitlab')
 
 
describe('GitLab API', () => {
 
test('get all projects', async () => {
 
let projects = await gitlab.getProjects(10, 0)
 
expect(projects).not.toBeNull()
 
})
 
test('get latest pipeline status of a project', async () => {
 
let status = await gitlab.getLatestPipelineStatus(81)
 
expect(status).not.toBeNull()
 
})
 
})
 
\ No newline at end of file
__test/methods.test.ts 0 → 100644
+ 16
- 0
  • View file @ 1b7070f8

  • Edit in single-file editor

  • Open in Web IDE

 
const methods = require('../functions/methods')
 
 
describe('DB methods', () => {
 
test('all mailinglists', async () => {
 
let lists = await methods.getAllMailinglists(0)
 
expect(lists).not.toBeNull()
 
})
 
test('project overview', async () => {
 
let overview = await methods.getProjectOverviewById(81)
 
expect(overview).not.toBeNull()
 
})
 
test('project images', async () => {
 
let images = await methods.getProjectImagesById(81)
 
expect(images).not.toBeNull()
 
})
 
})
 
\ No newline at end of file
jest.config.js 0 → 100644
+ 4
- 0
  • View file @ 1b7070f8

  • Edit in single-file editor

  • Open in Web IDE

 
module.exports = {
 
preset: 'ts-jest',
 
testEnvironment: 'node',
 
};
 
\ No newline at end of file
package-lock.json
+ 9743
- 2797
  • View file @ 1b7070f8

  • Edit in single-file editor

  • Open in Web IDE

Changes are too large to be shown.

View file @ 1b7070f8
package.json
+ 4
- 1
  • View file @ 1b7070f8

  • Edit in single-file editor

  • Open in Web IDE


@@ -17,7 +17,7 @@
@@ -17,7 +17,7 @@
"start": "nodemon app.ts",
"start": "nodemon app.ts",
"build": "tsc -build",
"build": "tsc -build",
"clean": "tsc -build --clean",
"clean": "tsc -build --clean",
"test": ""
"test": "jest"
},
},
"dependencies": {
"dependencies": {
"async": "^3.2.0",
"async": "^3.2.0",
@@ -43,9 +43,12 @@
@@ -43,9 +43,12 @@
"@types/express-fileupload": "^1.1.6",
"@types/express-fileupload": "^1.1.6",
"@types/express-flash": "^0.0.2",
"@types/express-flash": "^0.0.2",
"@types/express-session": "^1.17.3",
"@types/express-session": "^1.17.3",
 
"@types/jest": "^26.0.24",
"@types/morgan": "^1.9.2",
"@types/morgan": "^1.9.2",
"@types/passport": "^1.0.6",
"@types/passport": "^1.0.6",
 
"jest": "^27.0.6",
"nodemon": "^2.0.9",
"nodemon": "^2.0.9",
 
"ts-jest": "^27.0.3",
"ts-node": "^10.0.0",
"ts-node": "^10.0.0",
"typescript": "^4.3.5"
"typescript": "^4.3.5"
}
}
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: cherry-pick-c8c8abc3

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal