Tests: Start implementing tests

Only convertDateToISOString for now
This commit is contained in:
SileNce5k 2024-10-22 08:53:33 +02:00
parent e04d8857f9
commit 64ebfe784e
Signed by: SileNce
GPG key ID: B0A142BB4291B204
4 changed files with 3687 additions and 124 deletions

33
.github/workflows/run_node_tests.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: discord bot tests
on:
push:
branches: [ "*" ]
permissions:
contents: read
jobs:
discord_bot_tests:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
name: discord bot tests
steps:
# - name: Checkout the code
# uses: actions/checkout@v3
- name: install node and dependencies
run: |
apt update
apt install curl -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ]
printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
run: |
npm install
- name: run tests
run: |
npm jest