Commit 3a76e3c7 authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Hopefully fixes CI and makes reporting work


Signed-off-by: Mark Stenglein's avatarMark Stenglein <mark@stengle.in>
parent 06071efe
Pipeline #1126 passed with stages
in 46 seconds
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
"test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register --bail", "test": "NODE_ENV=test mocha --recursive --compilers ts:ts-node/register --bail",
"glabCLI": "mocha -R mochawesome -r ts-node/register test/**/*.spec.ts", "glabCLI": "mocha -R mochawesome -r ts-node/register test/**/*.spec.ts",
"lint": "tslint -r tslint.json src/**/*.ts", "lint": "tslint -r tslint.json src/**/*.ts",
"cover": "NODE_ENV=test nyc npm t" "cover": "NODE_ENV=test nyc --reporter=text-summary npm t",
"coveralls": "nyc report --reporter=lcov"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
...@@ -35,23 +36,23 @@ ...@@ -35,23 +36,23 @@
}, },
"dependencies": {}, "dependencies": {},
"nyc": { "nyc": {
"include": [ "include": [
"src/*.ts", "src/*.ts",
"src/**/*.ts" "src/**/*.ts"
], ],
"exclude": [ "exclude": [
"typings" "typings"
], ],
"extension": [ "extension": [
".ts" ".ts"
], ],
"require": [ "require": [
"ts-node/register" "ts-node/register"
], ],
"reporter": [ "reporter": [
"json", "json",
"html" "html"
], ],
"all": true "all": true
} }
} }
/* /*
* lib-ical * lib-ical
* Copyright (C) 2017 Mark Stenglein * Copyright (C) 2017 Mark Stenglein
...@@ -23,10 +22,10 @@ export default class DelegatorsParam extends Parameter { ...@@ -23,10 +22,10 @@ export default class DelegatorsParam extends Parameter {
constructor(delegators: string | string[]) { constructor(delegators: string | string[]) {
super("DELEGATED-FROM", []); super("DELEGATED-FROM", []);
if (Array.isArray(delegators)) {
delegators = (delegators instanceof Array) ? delegators : [delegators]; // Converts single string object to an array.
this._delegators = this._delegators.concat(<string[]>delegators); delegators = (delegators instanceof Array) ? delegators : [delegators];
} this._delegators = delegators;
} }
get delegators(): string[] { get delegators(): string[] {
...@@ -35,5 +34,6 @@ export default class DelegatorsParam extends Parameter { ...@@ -35,5 +34,6 @@ export default class DelegatorsParam extends Parameter {
set delegators(newDelegators: string[]) { set delegators(newDelegators: string[]) {
this._delegators = newDelegators; this._delegators = newDelegators;
this.paramValues = this._delegators;
} }
} }
{ {
"files": [ "files": [
"src/**/*.ts", "src/ICalElement.ts",
"src/*.ts" "src/Parameter.ts",
"src/CalUserTypeParam.ts",
"src/ContentLine.ts",
"src/AltRepParam.ts",
"src/DelegatorsParam.ts",
"src/CommonNameParam.ts",
"src/util.ts"
], ],
"compilerOptions": { "compilerOptions": {
"module": "commonjs", "module": "commonjs",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment