From 77bfad0307f4e5daea0584a30b0dcf24ccc9ec42 Mon Sep 17 00:00:00 2001 From: jw255 Date: Thu, 22 Feb 2018 16:57:45 +0000 Subject: restructuring of tests --- package.json | 2 ++ 1 file changed, 2 insertions(+) (limited to 'package.json') diff --git a/package.json b/package.json index 559efc7..15615c0 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,8 @@ "license": "UNLICENSED", "scripts": { "test": "mocha --reporter spec -r ts-node/register './**/*.test.ts'", + "test_unit": "mocha --reporter spec -r ts-node/register './**/*.unit.test.ts'", + "test_node": "mocha --reporter spec -r ts-node/register './**/*.node.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", -- cgit v1.2.1 From f66a9fa7f132f41b2e40029f0fb535521c3fb716 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sat, 24 Feb 2018 17:13:43 +0000 Subject: restructuring of tests + yarn install script --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 15615c0..ccdf7ad 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,9 @@ "main": "index.ts", "license": "UNLICENSED", "scripts": { - "test": "mocha --reporter spec -r ts-node/register './**/*.test.ts'", - "test_unit": "mocha --reporter spec -r ts-node/register './**/*.unit.test.ts'", - "test_node": "mocha --reporter spec -r ts-node/register './**/*.node.test.ts'", + "test": "mocha --reporter spec -r ts-node/register './test/**/*.test.ts'", + "test_routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", + "test_unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", -- cgit v1.2.1 From 80f5aeb37b3d997015238173499f4a067ec0c266 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sat, 24 Feb 2018 19:34:20 +0000 Subject: tests now actually test what they are supposed to and catch errors if needed --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index ccdf7ad..26089b5 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "license": "UNLICENSED", "scripts": { "test": "mocha --reporter spec -r ts-node/register './test/**/*.test.ts'", - "test_routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", - "test_unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", + "test:routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", + "test:unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", -- cgit v1.2.1 From 03d5f6178cfd424d7ede169fdf5ca5aade582453 Mon Sep 17 00:00:00 2001 From: jw255 Date: Tue, 27 Feb 2018 11:13:14 +0000 Subject: fixed compilation issues _2 --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 13bfa98..4a072d6 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "chai-http": "^3.0.0", "mocha": "^3.1.2", "nodemon": "^1.14.10", - "typedoc": "^0.10.0", - "tslint": "^5.9.1" + "tslint": "^5.9.1", + "typedoc": "^0.10.0" }, "dependencies": { "@types/body-parser": "0.0.33", @@ -44,6 +44,7 @@ "@types/sequelize": "^4.27.5", "body-parser": "^1.18.2", "express": "^4.16.2", + "mocha-each": "^1.1.0", "morgan": "^1.9.0", "pg": "^7.4.1", "pg-hstore": "^2.3.2", -- cgit v1.2.1 From 0caebd4bfdfd9c8d7840fc379412d5d1f867575f Mon Sep 17 00:00:00 2001 From: jw255 Date: Sat, 3 Mar 2018 14:53:31 +0000 Subject: pulled latest files from trh/payload-checker --- package.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 4a072d6..8359cf3 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,7 @@ "main": "index.ts", "license": "UNLICENSED", "scripts": { - "test": "mocha --reporter spec -r ts-node/register './test/**/*.test.ts'", - "test:routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", - "test:unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", + "test": "mocha --reporter spec -r ts-node/register './**/*.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", @@ -29,6 +27,7 @@ "@types/chai-http": "0.0.29", "@types/debug": "0.0.29", "@types/mocha": "^2.2.32", + "@types/mocha-each": "^1.1.0", "chai": "^3.5.0", "chai-http": "^3.0.0", "mocha": "^3.1.2", @@ -39,13 +38,22 @@ "dependencies": { "@types/body-parser": "0.0.33", "@types/express": "^4.0.33", + "@types/express-jwt": "^0.0.38", + "@types/jsonwebtoken": "^7.2.5", "@types/morgan": "^1.7.32", "@types/node": "^6.0.46", + "@types/passport": "^0.4.2", + "@types/passport-local": "^1.0.32", "@types/sequelize": "^4.27.5", + "@types/uuid": "^3.4.3", "body-parser": "^1.18.2", "express": "^4.16.2", + "express-jwt": "^5.3.0", + "jsonwebtoken": "^8.1.1", "mocha-each": "^1.1.0", "morgan": "^1.9.0", + "passport": "^0.4.0", + "passport-local": "^1.0.0", "pg": "^7.4.1", "pg-hstore": "^2.3.2", "reflect-metadata": "^0.1.12", @@ -53,6 +61,7 @@ "sequelize-typescript": "^0.6.2", "ts-node": "^3.3.0", "typescript": "^2.7.1", + "uuid": "^3.2.1", "xlsx": "^0.11.19" } } -- cgit v1.2.1 From 407a5a3c6c1d6d4c170d7646f921bb6f2fb2f380 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sat, 3 Mar 2018 16:18:01 +0000 Subject: now compiles. also added stubs for database testing --- package.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index 8359cf3..6ffbd00 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,11 @@ "main": "index.ts", "license": "UNLICENSED", "scripts": { - "test": "mocha --reporter spec -r ts-node/register './**/*.test.ts'", + "test": "mocha --reporter spec -r ts-node/register './test/**/*.test.ts'", + "test:routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", + "test:unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", + "test:db": "mocha --reporter spec -r ts-node/register './test/**/*database.unit.test.ts'", + "test:routes:index": "mocha --reporter spec -r ts-node/register './test/**/*index.routes.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", @@ -45,6 +49,7 @@ "@types/passport": "^0.4.2", "@types/passport-local": "^1.0.32", "@types/sequelize": "^4.27.5", + "@types/supertest": "^2.0.4", "@types/uuid": "^3.4.3", "body-parser": "^1.18.2", "express": "^4.16.2", @@ -59,6 +64,7 @@ "reflect-metadata": "^0.1.12", "sequelize": "^4.32.7", "sequelize-typescript": "^0.6.2", + "supertest": "^3.0.0", "ts-node": "^3.3.0", "typescript": "^2.7.1", "uuid": "^3.2.1", -- cgit v1.2.1 From ecd7bc6f4eb2e330af36a336a3aa931319aa2c32 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sun, 4 Mar 2018 17:36:41 +0000 Subject: fixed authentication and DB initialisation --- package.json | 1 + 1 file changed, 1 insertion(+) (limited to 'package.json') diff --git a/package.json b/package.json index 6ffbd00..1047a03 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", + "lint:tests": "tslint --fix --force ./test/**/*", "_gl-lint": "tslint -p './tsconfig.json'" }, "repository": { -- cgit v1.2.1 From dfa461025cece1c17d70f0763848ab434a62ed8d Mon Sep 17 00:00:00 2001 From: jw255 Date: Mon, 5 Mar 2018 17:57:19 +0000 Subject: authentication tests in progress --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package.json') diff --git a/package.json b/package.json index 1047a03..4d4789c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "test:routes": "mocha --reporter spec -r ts-node/register './test/**/*.routes.test.ts'", "test:unit": "mocha --reporter spec -r ts-node/register './test/**/*.unit.test.ts'", "test:db": "mocha --reporter spec -r ts-node/register './test/**/*database.unit.test.ts'", - "test:routes:index": "mocha --reporter spec -r ts-node/register './test/**/*index.routes.test.ts'", + "test:routes:auth": "mocha --reporter spec -r ts-node/register './test/**/*auth.routes.test.ts'", "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "start": "ts-node src/index.ts", "lint": "tslint --fix --force -p './tsconfig.json'", -- cgit v1.2.1