Skip to content

Commit

Permalink
Adding mocha & chai
Browse files Browse the repository at this point in the history
  • Loading branch information
noltron000 committed Mar 18, 2022
1 parent 31472cf commit e408c0e
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .mocharc.json
@@ -0,0 +1,8 @@
{
"extension": ["ts"],
"node-option": [
"experimental-specifier-resolution=node",
"loader=ts-node/esm"
],
"spec": ["./**/*.test.ts"]
}
8 changes: 6 additions & 2 deletions package.json
Expand Up @@ -26,15 +26,19 @@
"main": "./source/main.js",
"type": "module",
"scripts": {
"test": "node --loader ts-node/esm ./source/tests/main.test.ts"
"test": "mocha"
},
"dependencies": {
"fast-cartesian": "^6.1.0",
"mathjs": "^10.4.0"
},
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/mocha": "^9.1.0",
"@types/node": "^17.0.16",
"ts-node": "^10.5.0",
"chai": "^4.3.6",
"mocha": "^9.2.2",
"ts-node": "^10.7.0",
"typescript": "^4.5.5"
}
}
8 changes: 8 additions & 0 deletions source/tests/sanity.test.ts
@@ -0,0 +1,8 @@
import 'mocha'
import { expect } from 'chai'

describe('Sanity test', () => {
it('Should ensure true to be true', () => {
expect(true).to.equal(true)
})
})

0 comments on commit e408c0e

Please sign in to comment.