Skip to content

Commit

Permalink
Added tests and changed structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Glowstudent777 committed May 15, 2024
1 parent 7999fbb commit 8cafe55
Show file tree
Hide file tree
Showing 12 changed files with 3,887 additions and 1,277 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name : Checkout repo
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v3

- name: Install dependencies
run: npm install

- run: npm run test
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
testRegex: '/tests/.*\\.(test|spec)?\\.(ts|tsx)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
};
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "@glowstudent/youversion",
"version": "1.3.0",
"version": "1.3.1",
"description": "A simple module to get the Verse of the Day and any verse you would like.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": ["dist"],
"files": [
"dist"
],
"funding": "https://ko-fi.com/glowstudent",
"dependencies": {
"axios": "1.1.3",
Expand All @@ -15,11 +17,14 @@
"@babel/cli": "^7.19.3",
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@types/jest": "^29.5.12",
"@types/node": "^18.11.9",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^4.9.3"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"test": "jest",
"build": "npm run babel && npm run tsc && npm run pack",
"babel": "babel src -d dist --copy-files",
"tsc": "npx tsc",
Expand All @@ -36,4 +41,4 @@
"url": "https://github.com/Glowstudent777/YouVersion-API-NPM/issues"
},
"homepage": "https://github.com/Glowstudent777/YouVersion-API-NPM#readme"
}
}
Loading

0 comments on commit 8cafe55

Please sign in to comment.