forked from tools/josh
Use Mocha+Chai as test framework
This commit is contained in:
parent
60dd4e188f
commit
dfabe2df63
Binary file not shown.
|
@ -7,22 +7,28 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git@git.fwdekker.com:FWDekker/fwdekker.com.git"
|
"url": "git@git.fwdekker.com:FWDekker/fwdekker.com.git"
|
||||||
},
|
},
|
||||||
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "grunt dev",
|
"dev": "grunt dev",
|
||||||
"deploy": "grunt deploy",
|
"deploy": "grunt deploy",
|
||||||
"test": "echo TODO"
|
"test": "mocha -r ts-node/register src/**/*.spec.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"js-cookie": "^2.2.1"
|
"js-cookie": "^2.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/chai": "^4.2.4",
|
||||||
"@types/js-cookie": "^2.2.4",
|
"@types/js-cookie": "^2.2.4",
|
||||||
|
"@types/mocha": "^5.2.7",
|
||||||
|
"chai": "^4.2.0",
|
||||||
"grunt": "^1.0.4",
|
"grunt": "^1.0.4",
|
||||||
"grunt-cli": "^1.3.2",
|
"grunt-cli": "^1.3.2",
|
||||||
"grunt-contrib-clean": "^2.0.0",
|
"grunt-contrib-clean": "^2.0.0",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
"grunt-webpack": "^3.1.3",
|
"grunt-webpack": "^3.1.3",
|
||||||
|
"mocha": "^6.2.2",
|
||||||
"ts-loader": "^6.2.1",
|
"ts-loader": "^6.2.1",
|
||||||
|
"ts-node": "^8.4.1",
|
||||||
"typescript": "^3.6.4",
|
"typescript": "^3.6.4",
|
||||||
"webpack": "^4.41.2",
|
"webpack": "^4.41.2",
|
||||||
"webpack-cli": "^3.3.10"
|
"webpack-cli": "^3.3.10"
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
import test from "ava";
|
|
||||||
// import {Path} from "./../../build/js/fs.js";
|
|
||||||
|
|
||||||
test("paths", t => {
|
|
||||||
t.is("a", "a", "OH YES");
|
|
||||||
});
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
import "mocha";
|
||||||
|
import {expect} from "chai";
|
||||||
|
|
||||||
|
import "../main/js/extensions"
|
||||||
|
import {Path} from "../main/js/fs";
|
||||||
|
|
||||||
|
|
||||||
|
describe("Hello function", () => {
|
||||||
|
it("should return hello world", () => {
|
||||||
|
expect(new Path("/", "/").path).to.equal("/");
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "esnext",
|
|
||||||
"target": "es2019",
|
"target": "es2019",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"rootDir": "./src/main/js/",
|
"rootDir": "./src/main/js/",
|
||||||
|
|
Loading…
Reference in New Issue