add test framework

main
Dennis Wielepsky 2024-09-24 15:46:10 +02:00
parent 9625b1be2c
commit 24f18546f6
6 changed files with 8306 additions and 9 deletions

3
.babelrc Normal file
View File

@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env"]
}

5
jest.config.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
transform: {
'^.+\\.js$': 'babel-jest',
},
};

8286
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,8 @@
"description": "mirror all your public github repositories to your gitea server",
"main": "index.js",
"scripts": {
"build": "npx esbuild src/index.js --bundle --outdir=dist/ --platform=node"
"build": "esbuild src/index.js --bundle --outdir=dist/ --platform=node",
"test": "jest"
},
"repository": {
"type": "git",
@ -19,10 +20,14 @@
"homepage": "https://github.com/jaedle/mirror-to-gitea#readme",
"dependencies": {
"@octokit/rest": "^21.0.2",
"@types/jest": "^29.5.13",
"p-queue": "^8.0.1",
"superagent": "^10.1.0"
},
"devDependencies": {
"esbuild": "0.24.0"
"@babel/preset-env": "^7.25.4",
"babel-jest": "^29.7.0",
"esbuild": "0.24.0",
"jest": "^29.7.0"
}
}

View File

@ -0,0 +1,5 @@
function getRepositories() {
}
export default getRepositories;

View File

@ -0,0 +1,7 @@
import {default as get} from './get-github-repositories'
describe('get-github-repfalseositories', () => {
it('fetches public repositories', () => {
get();
});
});