Skip to content

Commit

Permalink
add new tests, version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
anilmisirlioglu committed Nov 3, 2020
1 parent 50e672b commit b1e7eb4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asena",
"version": "1.3.3",
"version": "1.3.4",
"description": "Fast and reliable raffle and poll bot for Discord",
"homepage": "https://asena.xyz",
"main": "./src/index.ts",
Expand All @@ -25,7 +25,7 @@
"build": "tsc",
"start:dev": "nodemon --ext ts-node src/index.ts",
"start": "NODE_ENV=production node build/index.js",
"test": "mocha -r ts-node/register tests/*.test.ts"
"test": "mocha -r ts-node/register tests/unit/*.test.ts"
},
"dependencies": {
"child_process": "^1.0.2",
Expand Down
12 changes: 12 additions & 0 deletions tests/unit/version.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'mocha';
import Version from '../../src/utils/Version';
import assert from 'assert';

describe('Version Test', () => {
it('must be greater than or equal to the last version', () => {
const currentVersion = new Version('1.3.4')
const packageVersion = new Version(process.env.npm_package_version)

assert.notStrictEqual(currentVersion.compare(packageVersion), -1)
})
})

0 comments on commit b1e7eb4

Please sign in to comment.