Compare commits

..

No commits in common. "10e429c870f0823fbe92986492f349c06d47add5" and "15b25c5732b4ae422722cebfdb457b6a7c423d3b" have entirely different histories.

3 changed files with 15 additions and 11 deletions

View file

@ -3,8 +3,8 @@
| name | tests |
| -----| ----- |
| Github | ![CI tests](https://github.com/SileNce5k/discord_bot/actions/workflows/CI.yml/badge.svg?branch=master) |
| git.silence5k.com (forgejo-runner) | ![CI tests](https://git.silence5k.com/SileNce/discord_bot/actions/workflows/CI.yml/badge.svg?branch=master) |
| Github | ![CI tests](https://github.com/SileNce5k/discord_bot/actions/workflows/CI.yml/badge.svg)|
|git.silence5k.com (forgejo-runner) | ![CI tests](https://git.silence5k.com/SileNce/discord_bot/actions/workflows/CI.yml/badge.svg)|
##

View file

@ -16,8 +16,11 @@ let expectedResults = [
]
if(beforeSizes.length != expectedResults.length) throw "Error: beforeSizes and expectedResults are unequal length"
test('calculateReloaded test', () => {
for(let i = 0; i < beforeSizes.length; i++){
for(let i = 0; i < beforeSizes.length; i++){
test('calculateReloaded test', () => {
expect(calculateReloaded(beforeSizes[i], client)).toBe(expectedResults[i])
}
});
});
}

View file

@ -3,9 +3,10 @@ const convertDateToISOString = require('../util/convertDateToISOString');
let dates = [new Date("2020-01-01"), new Date(0), new Date(5600000), new Date(1000200000000)]
let expectedDateStrings = ["2020-01-01 00:00:00", "1970-01-01 00:00:00", "1970-01-01 01:33:20", "2001-09-11 09:20:00"]
for (let i = 0; i < dates.length; i++) {
test('Converts to human readable date string', () => {
for (let i = 0; i < dates.length; i++) {
expect(convertDateToISOString(dates[i])).toBe(expectedDateStrings[i]);
}
});
test('Converts to human readable date string', () => {
expect(convertDateToISOString(dates[i])).toBe(expectedDateStrings[i]);
});
}