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 --- coverage/project-code/src/index.ts.html | 227 ++++++++++++++++++++++++++++++++ 1 file changed, 227 insertions(+) create mode 100644 coverage/project-code/src/index.ts.html (limited to 'coverage/project-code/src/index.ts.html') diff --git a/coverage/project-code/src/index.ts.html b/coverage/project-code/src/index.ts.html new file mode 100644 index 0000000..d4515b2 --- /dev/null +++ b/coverage/project-code/src/index.ts.html @@ -0,0 +1,227 @@ + + + + Code coverage report for project-code/src/index.ts + + + + + + + +
+
+

+ All files / project-code/src index.ts +

+
+
+ 0% + Statements + 0/16 +
+
+ 0% + Branches + 0/4 +
+
+ 0% + Functions + 0/2 +
+
+ 0% + Lines + 0/16 +
+
+
+
+

+
+
1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
/* tslint:disable:no-console
+ * This only goes here until we have a logging system */
+ 
+console.log('begin import');
+import { default as app } from './app';
+import { default as seq } from './db/orm';
+console.log('end import');
+ 
+import { default as UserGroup } from './db/model/UserGroup';
+ 
+const DEFAULT_PORT: number = 3000;
+ 
+// Use default port 3000 or port supplied by OS
+const port: number = process.env.PORT
+	? process.env.PORT
+	: DEFAULT_PORT;
+ 
+// tslint:disable:no-floating-promises
+(async(): Promise<void> => {
+	console.log('Booting PSQL database');
+ 
+	await seq.authenticate();
+ 
+	console.log('Resetting Database');
+ 
+	await seq.sync({
+		force: true
+	});
+ 
+	const admin: UserGroup = new UserGroup({
+		name: 'admin',
+		canCreateUsers: true,
+		canDeleteUsers: true,
+		canEditUsers: true,
+		canCreateProjects: true,
+		canDeleteProjects: true,
+		canEditProjects: true,
+		isInternal: false,
+		description: 'Systems admin'
+	});
+ 
+	// tslint:disable:no-floating-promises
+	admin.save();
+ 
+	console.log('Booting ExpressJS server');
+ 
+	app.listen(port, (err: Error) => {
+		if (err) {
+			return console.log(err);
+		} else {
+			return console.log(`server is listening on port ${port}`);
+		}
+	});
+})();
+ 
+
+
+ + + + + + + -- cgit v1.2.1