Skip to content
This repository was archived by the owner on May 8, 2020. It is now read-only.

Commit 8542b67

Browse files
committed
fix: Fix es2015 compilation
1 parent 8e76637 commit 8542b67

File tree

3 files changed

+21
-30
lines changed

3 files changed

+21
-30
lines changed

src/core/Exception.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export class Exception extends Error {
33
* Exception base name
44
* @type {string}
55
*/
6-
public name: string = "HttpException";
6+
public name: string = "HTTP_EXCEPTION";
77
/**
88
* Message of the exception
99
*/

test/Exception.spec.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import {expect, assert} from "chai";
2-
import {
3-
Exception
4-
} from "../src";
1+
import {expect} from "chai";
2+
import {Exception} from "../src";
53

64
describe("Exception", () => {
75

@@ -10,7 +8,7 @@ describe("Exception", () => {
108
const exception = new Exception(203, "test", new Error("test"));
119

1210
expect(exception.status).to.equal(203);
13-
expect(exception.toString()).to.equal("HttpException(203): test, innerException: test");
11+
expect(exception.toString()).to.equal("HTTP_EXCEPTION(203): test, innerException: test");
1412

1513
});
1614

@@ -19,7 +17,7 @@ describe("Exception", () => {
1917
const exception = new Exception(203, "test", "test");
2018

2119
expect(exception.status).to.equal(203);
22-
expect(exception.toString()).to.equal("HttpException(203): test, innerException: test");
20+
expect(exception.toString()).to.equal("HTTP_EXCEPTION(203): test, innerException: test");
2321

2422
});
2523

@@ -28,7 +26,7 @@ describe("Exception", () => {
2826
const exception = new Exception(203, "test", 1);
2927

3028
expect(exception.status).to.equal(203);
31-
expect(exception.toString()).to.equal("HttpException(203): test, innerException: 1");
29+
expect(exception.toString()).to.equal("HTTP_EXCEPTION(203): test, innerException: 1");
3230

3331
});
3432

@@ -37,9 +35,7 @@ describe("Exception", () => {
3735
const exception = new Exception(203, undefined);
3836

3937
expect(exception.status).to.equal(203);
40-
expect(exception.toString()).to.equal("HttpException(203):");
38+
expect(exception.toString()).to.equal("HTTP_EXCEPTION(203):");
4139

4240
});
43-
44-
4541
});

tsconfig.compile.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
{
2+
"extends": "./tsconfig.json",
23
"compilerOptions": {
3-
"module": "commonjs",
4-
"target": "es5",
5-
"noImplicitAny": false,
6-
"sourceMap": true,
7-
"experimentalDecorators":true,
8-
"emitDecoratorMetadata": true,
9-
"moduleResolution": "node",
10-
"isolatedModules": false,
11-
"suppressImplicitAnyIndexErrors": false,
12-
"lib": [
13-
"es6",
14-
"dom"
15-
],
4+
"declaration": true,
165
"rootDir": "src/",
176
"outDir": "lib/",
18-
"declaration": true,
19-
"declarationDir":"lib/",
7+
"declarationDir": "lib/",
208
"noResolve": false,
21-
"typeRoots": ["node_modules/@types"]
9+
"preserveConstEnums": true
2210
},
23-
11+
"include": [
12+
"src/**/*"
13+
],
2414
"exclude": [
25-
"src/**/*.spec.ts",
2615
"node_modules",
2716
"test",
28-
"dts"
17+
"multipartfiles",
18+
"swagger",
19+
"servestatic",
20+
"ajv",
21+
"socketio",
22+
"test",
23+
"lib"
2924
]
3025
}

0 commit comments

Comments
 (0)