Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

View file

@ -0,0 +1,28 @@
# Issue guidelines
If you want to add a really specific behavior to the reporter, please consider to [build and use your own display processor](https://github.com/bcaudan/jasmine-spec-reporter/blob/master/docs/customize-output.md).
Please fill in this template, delete this intro and any unrelated text :smile:
## Bug report
Check with "x":
- [ ] I have this issue with the latest release of [jasmine-spec-reporter](https://github.com/bcaudan/jasmine-spec-reporter/releases)
- [ ] I have this issue with the latest release of [jasmine](https://github.com/jasmine/jasmine/releases)
- [ ] I can reproduce this issue with one of the [examples](https://github.com/bcaudan/jasmine-spec-reporter/tree/master/examples)
**Current behavior**
**Expected behavior**
**Minimal reproduction of the problem with instructions**
## Feature request
**Current behavior**
**Wanted behavior**
**What is the motivation / use case for changing the behavior?**

View file

@ -0,0 +1,17 @@
# PR guidelines
If you want to add a really specific behavior to the reporter, please consider to [build and use your own display processor](https://github.com/bcaudan/jasmine-spec-reporter/blob/master/docs/customize-output.md).
Please fill in this template, delete this intro and any unrelated text :smile:
**Requirements**
Check with "x":
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
**What is the current behavior?**
**What is the new behavior?**

1
node_modules/jasmine-spec-reporter/.nvmrc generated vendored Normal file
View file

@ -0,0 +1 @@
10

311
node_modules/jasmine-spec-reporter/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,311 @@
# 6.0.0
## Feature
* Use colors/safe [#538](https://github.com/bcaudan/jasmine-spec-reporter/pull/538)
## Breaking change
String prototype does not contain color properties anymore, colors must now be applied with the new `theme` component available as a field in [custom display processors](docs/customize-output.md).
**Before:**
```ts
class MyProcessor extends DisplayProcessor {
public displaySuccessfulSpec(spec: CustomReporterResult, log: string): string {
return "OK ".successful + log;
}
}
```
**Now:**
```ts
class MyProcessor extends DisplayProcessor {
public displaySuccessfulSpec(spec: CustomReporterResult, log: string): string {
return this.theme.successful("OK ") + log;
}
}
```
# 5.0.2
## Bugfix
* pretty stacktrace: catch uncaught exception on node internal files [#479](https://github.com/bcaudan/jasmine-spec-reporter/pull/479)
# 5.0.1
## Bugfix
* Promote colors as a dependency [#472](https://github.com/bcaudan/jasmine-spec-reporter/pull/472)
# 5.0.0
## Feature
* New option to display pretty stacktraces [#467](https://github.com/bcaudan/jasmine-spec-reporter/pull/467)
## Breaking change
`displayStacktrace` options now take a value among `none`, `raw` and `pretty`.
# 4.2.1
## Bugfix
* Restore compatibility with jasmine < 2.5.0 [#222](https://github.com/bcaudan/jasmine-spec-reporter/pull/222), [#223](https://github.com/bcaudan/jasmine-spec-reporter/pull/223)
# 4.2.0
## Feature
* Support reporting errors in afterAll [#210](https://github.com/bcaudan/jasmine-spec-reporter/issues/210), [#214](https://github.com/bcaudan/jasmine-spec-reporter/issues/214)
# 4.1.1
## Bugfix
* Correct report from jasmineStarted event [#185](https://github.com/bcaudan/jasmine-spec-reporter/issues/185)
# 4.1.0
## Feature
* If any defined spec is not executed, report INCOMPLETE rather than SUCCESS [#142](https://github.com/bcaudan/jasmine-spec-reporter/issues/142), [#145](https://github.com/bcaudan/jasmine-spec-reporter/issues/145)
## Other
* Rewrite unit tests by bumping jasmine-core to 2.6.x [#155](https://github.com/bcaudan/jasmine-spec-reporter/issues/155)
* Use yarn for development [#98](https://github.com/bcaudan/jasmine-spec-reporter/issues/98), [#138](https://github.com/bcaudan/jasmine-spec-reporter/issues/138)
* Add `greenkeeper-yarn.sh` to automatically updates yarn.lock on greenkeeper PR
# 4.0.0
* Use string primitive instead of String wrapper object [#134](https://github.com/bcaudan/jasmine-spec-reporter/issues/134), [#137](https://github.com/bcaudan/jasmine-spec-reporter/issues/137)
## Breaking change
It only impacts TypeScript integrations, `DisplayProcessor` methods signature now use `string` instead of `String`.
Before:
displaySuite(suite: CustomReporterResult, log: String): String;
Now:
displaySuite(suite: CustomReporterResult, log: string): string;
# 3.3.0
* Add low-level print configuration option [#129](https://github.com/bcaudan/jasmine-spec-reporter/issues/129), [#130](https://github.com/bcaudan/jasmine-spec-reporter/issues/130)
# 3.2.0
* Add an option to remove duration from execution summary.
* Add jasmine & protractor integration tests [#82](https://github.com/bcaudan/jasmine-spec-reporter/issues/82)
# 3.1.0
* Add `displaySpecErrorMessages` and `displaySummaryErrorMessages` to DisplayProcessor [#85](https://github.com/bcaudan/jasmine-spec-reporter/issues/85)
* Add an option to remove error messages [#62](https://github.com/bcaudan/jasmine-spec-reporter/issues/62)
* Add an option to customize stacktrace filtering [#72](https://github.com/bcaudan/jasmine-spec-reporter/issues/72)
# 3.0.0
## Breaking changes
* Remove support for node 0.10
* `jasmine-spec-reporter` module exports `SpecReporter` and `DisplayProcessor`, see [SpecReporter](./examples/node) and [DisplayProcessor](./docs/customize-output.md) usages.
* Extract groups in configuration and rationalize property names, [see new structure](./src/configuration.ts). [#57](https://github.com/bcaudan/jasmine-spec-reporter/issues/57)
* Colors deactivation is now achieved with this configuration:
{
colors: {
enabled: false
}
}
* Custom options for custom processors must now be stored in this configuration field:
{
customOptions: {
foo: 'bar'
}
}
## Other
* Migrate code base to TypeScript
* Add example for [TypeScript integration](./examples/typescript)
* Extract each example in a dedicated node module, [see examples](./examples)
# 2.7.0
* Add successes summary. [#49](https://github.com/bcaudan/jasmine-spec-reporter/issues/49)
# 2.6.0
* Display seed used if specs are randomized. [#55](https://github.com/bcaudan/jasmine-spec-reporter/issues/55)
# 2.5.0
* Added support for windows platform to show tick mark and cross symbols. [#52](https://github.com/bcaudan/jasmine-spec-reporter/issues/52)
# 2.4.0
* Add singular form of spec metrics. [#41](https://github.com/bcaudan/jasmine-spec-reporter/issues/41)
# 2.3.0
## Feature
* Add pending summary to display pending reasons. [#33](https://github.com/bcaudan/jasmine-spec-reporter/issues/33)
* Have same sign/color convention than jasmine default reporter for pending specs.
## Other
* Add tests on colors. [#34](https://github.com/bcaudan/jasmine-spec-reporter/issues/34)
* Bump dependencies versions
# 2.2.3
Ensure that colors are always enabled. [#36](https://github.com/bcaudan/jasmine-spec-reporter/issues/36)
# 2.2.2
## Bugfix
* Fixes All specs displayed when using `fdescribe` and `fit`. [#37](https://github.com/bcaudan/jasmine-spec-reporter/issues/37)
# 2.2.1
## Bugfix
* Disabled specs was incorrectly reported as failed. [#28](https://github.com/bcaudan/jasmine-spec-reporter/issues/28)
## Other
* Tests: Use jasmine env instead of fake env [#25](https://github.com/bcaudan/jasmine-spec-reporter/issues/25)
# 2.2.0
## Feature
* **stacktrace**: `displayStacktrace` option has now 4 modes available [#26](https://github.com/bcaudan/jasmine-spec-reporter/issues/26):
* all: display stacktraces for failed specs and in failures summary.
* specs: display stacktraces for failed specs only.
* summary: display stacktraces in failures summary only.
* none: do not display stacktraces.
* **processor**:
* add `displayJasmineStarted` hook
* add `displaySpecStarted` hook [#23](https://github.com/bcaudan/jasmine-spec-reporter/issues/23)
## Breaking change
`displayStacktrace: true` is not working anymore. You will have to choose the displayStacktrace mode that suits you best.
## Other
* Bump dependencies versions
* Rework documentation
# 2.1.0
When a suite or spec is focused, it displays the total of specs defined and the number of skipped specs [#11](https://github.com/bcaudan/jasmine-spec-reporter/issues/11)
# 2.0.0
## Feature
Add support for jasmine 2.x [#10](https://github.com/bcaudan/jasmine-spec-reporter/issues/10)
## Breaking change
- Jasmine 1.x is not supported by this version
- Skipped specs are not displayable in favour of pending specs.
# 1.2.0
## Feature
* **stacktrace**: `displayStacktrace` option has now 4 modes available:
* all: display stacktraces for failed specs and in failures summary.
* specs: display stacktraces for failed specs only.
* summary: display stacktraces in failures summary only.
* none: do not display stacktraces.
* **processor**: add `displayJasmineStarted` hook
## Breaking change
`displayStacktrace: true` is not working anymore. You will have to choose the displayStacktrace mode that suits you best.
## Other
* Bump colors versions
* Rework documentation
# 1.1.2
Add message when reporter 1.x is used with jasmine > 1.x
# 1.1.1
Fixes error when the stacktrace is undefined [#22](https://github.com/bcaudan/jasmine-spec-reporter/issues/22)
# 1.1.0
Add suite number option [#19](https://github.com/bcaudan/jasmine-spec-reporter/issues/19)
# 1.0.0
## Feature
Add customProcessors option [#18](https://github.com/bcaudan/jasmine-spec-reporter/issues/18)
## Breaking change
Jasmine spec reporter is no more added to the jasmine object. So, make sure to use it like it is described in the [usage section](https://github.com/bcaudan/jasmine-spec-reporter/blob/master/README.md#usage).
# 0.6.0
- Add option to configure spec prefixes [#14](https://github.com/bcaudan/jasmine-spec-reporter/issues/14)
- Filter jasmine stacktrace [#12](https://github.com/bcaudan/jasmine-spec-reporter/issues/12)
# 0.5.0
Display failures summary [#13](https://github.com/bcaudan/jasmine-spec-reporter/issues/13)
# 0.4.0
- Add option to disable colors [#4](https://github.com/bcaudan/jasmine-spec-reporter/issues/4)
- Add option to overwrite color theme [#5](https://github.com/bcaudan/jasmine-spec-reporter/issues/5)
- Add option to include skipped specs [#2](https://github.com/bcaudan/jasmine-spec-reporter/issues/2)
# 0.3.3
Add option to display spec duration [#6](https://github.com/bcaudan/jasmine-spec-reporter/issues/6)
# 0.3.2
Display human readable duration [#9](https://github.com/bcaudan/jasmine-spec-reporter/issues/9)
# 0.3.1
Added a hack procedure to remove dot reporter [#8](https://github.com/bcaudan/jasmine-spec-reporter/issues/8)
# 0.3.0
Add options to exclude successful / failed specs [#3](https://github.com/bcaudan/jasmine-spec-reporter/issues/3)
# 0.2.0
Add option to include stack trace on failure [#1](https://github.com/bcaudan/jasmine-spec-reporter/issues/1)
# 0.1.0
First version with unit tests

201
node_modules/jasmine-spec-reporter/LICENSE generated vendored Normal file
View file

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2014 Bastien Caudan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

44
node_modules/jasmine-spec-reporter/README.md generated vendored Normal file
View file

@ -0,0 +1,44 @@
jasmine-spec-reporter
=====================
[![Greenkeeper badge](https://badges.greenkeeper.io/bcaudan/jasmine-spec-reporter.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/bcaudan/jasmine-spec-reporter.svg?branch=master)](https://travis-ci.org/bcaudan/jasmine-spec-reporter)
[![codecov](https://codecov.io/gh/bcaudan/jasmine-spec-reporter/branch/master/graph/badge.svg)](https://codecov.io/gh/bcaudan/jasmine-spec-reporter)
Real time console spec reporter for jasmine testing framework.
![](screenshot.gif)
# Usage
## Installation
Install `jasmine-spec-reporter` via npm:
npm install jasmine-spec-reporter --save-dev
## Examples
* [Jasmine node tests](examples/node)
* [Protractor tests](examples/protractor)
* [TypeScript support](examples/typescript)
## Configuration
See full configuration and features: [configuration.ts](src/configuration.ts)
## Custom output
You can customize the output of the reporter yourself: [see how](docs/customize-output.md).
# Development
## Requirements
* npm >= 5
## Commands
* install dependencies: `npm install`
* launch unit tests: `npm test`
* launch integration tests: `npm run test:integration`
## Debugging
Unit tests hijack `console.log` to verify output; use `console.warn` to debug.

View file

@ -0,0 +1,2 @@
import { Configuration } from "./configuration";
export declare function parse(conf?: Configuration): Configuration;

View file

@ -0,0 +1,89 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parse = void 0;
var configuration_1 = require("./configuration");
function parse(conf) {
return merge(defaultConfiguration, conf);
}
exports.parse = parse;
var isWindows = process && process.platform === "win32";
var defaultConfiguration = {
colors: {
enabled: true,
failed: "red",
pending: "yellow",
successful: "green",
prettyStacktraceFilename: "cyan",
prettyStacktraceLineNumber: "yellow",
prettyStacktraceColumnNumber: "yellow",
prettyStacktraceError: "red",
},
customProcessors: [],
prefixes: {
failed: isWindows ? "\u00D7 " : "✗ ",
pending: "* ",
successful: isWindows ? "\u221A " : "✓ ",
},
print: function (stuff) { return console.log(stuff); },
spec: {
displayDuration: false,
displayErrorMessages: true,
displayFailed: true,
displayPending: false,
displayStacktrace: configuration_1.StacktraceOption.NONE,
displaySuccessful: true,
},
stacktrace: {
filter: function (stacktrace) {
var lines = stacktrace.split("\n");
var filtered = [];
for (var i = 1; i < lines.length; i++) {
if (!/(jasmine[^\/]*\.js|Timer\.listOnTimeout)/.test(lines[i])) {
filtered.push(lines[i]);
}
}
return filtered.join("\n");
}
},
suite: {
displayNumber: false,
},
summary: {
displayDuration: true,
displayErrorMessages: true,
displayFailed: true,
displayPending: true,
displayStacktrace: configuration_1.StacktraceOption.NONE,
displaySuccessful: false,
},
};
function merge(template, override) {
var result = {};
for (var key in template) {
if (template[key] instanceof Object
&& !(template[key] instanceof Array)
&& !(template[key] instanceof Function)
&& override instanceof Object
&& override[key] instanceof Object
&& !(override[key] instanceof Array)
&& !(override[key] instanceof Function)) {
result[key] = merge(template[key], override[key]);
}
else if (override instanceof Object
&& Object.keys(override).indexOf(key) !== -1) {
result[key] = override[key];
if (key === "displayStacktrace" && typeof override[key] === "boolean") {
console.warn("WARN: jasmine-spec-reporter 'displayStacktrace' option supports value ('none', 'raw', 'pretty'), default to 'none'\n");
result[key] = configuration_1.StacktraceOption.NONE;
}
}
else {
result[key] = template[key];
}
}
if (override instanceof Object && override.customOptions) {
result.customOptions = override.customOptions;
}
return result;
}
//# sourceMappingURL=configuration-parser.js.map

View file

@ -0,0 +1,139 @@
import { DisplayProcessor } from "./display-processor";
export declare enum StacktraceOption {
NONE = "none",
RAW = "raw",
PRETTY = "pretty"
}
export declare class Configuration {
suite?: {
/**
* display each suite number (hierarchical)
*/
displayNumber?: boolean;
};
spec?: {
/**
* display error messages for each failed assertion
*/
displayErrorMessages?: boolean;
/**
* display stacktrace for each failed assertion
*/
displayStacktrace?: StacktraceOption;
/**
* display each successful spec
*/
displaySuccessful?: boolean;
/**
* display each failed spec
*/
displayFailed?: boolean;
/**
* display each pending spec
*/
displayPending?: boolean;
/**
* display each spec duration
*/
displayDuration?: boolean;
};
summary?: {
/**
* display error messages for each failed assertion
*/
displayErrorMessages?: boolean;
/**
* display stacktrace for each failed assertion
*/
displayStacktrace?: StacktraceOption;
/**
* display summary of all successes after execution
*/
displaySuccessful?: boolean;
/**
* display summary of all failures after execution
*/
displayFailed?: boolean;
/**
* display summary of all pending specs after execution
*/
displayPending?: boolean;
/**
* display execution duration
*/
displayDuration?: boolean;
};
/**
* Colors are displayed in the console via colors package: https://github.com/Marak/colors.js.
* You can see all available colors on the project page.
*/
colors?: {
/**
* enable colors
*/
enabled?: boolean;
/**
* color for successful spec
*/
successful?: string;
/**
* color for failing spec
*/
failed?: string;
/**
* color for pending spec
*/
pending?: string;
/**
* color for pretty stacktrace filename
*/
prettyStacktraceFilename?: string;
/**
* color for pretty stacktrace line number
*/
prettyStacktraceLineNumber?: string;
/**
* color for pretty stacktrace column number
*/
prettyStacktraceColumnNumber?: string;
/**
* color for pretty stacktrace error
*/
prettyStacktraceError?: string;
};
prefixes?: {
/**
* prefix for successful spec
*/
successful?: string;
/**
* prefix for failing spec
*/
failed?: string;
/**
* prefix for pending spec
*/
pending?: string;
};
stacktrace?: {
/**
* Customize stacktrace filtering
*/
filter?(stacktrace: string): string;
};
/**
* list of display processor to customize output
* see https://github.com/bcaudan/jasmine-spec-reporter/blob/master/docs/customize-output.md
*/
customProcessors?: (typeof DisplayProcessor)[];
/**
* options for custom processors
*/
customOptions?: any;
/**
* Low-level printing function, defaults to console.log.
* Use process.stdout.write(log + '\n'); to avoid output to
* devtools console while still reporting to command line.
*/
print?: (log: string) => void;
}

View file

@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Configuration = exports.StacktraceOption = void 0;
var StacktraceOption;
(function (StacktraceOption) {
StacktraceOption["NONE"] = "none";
StacktraceOption["RAW"] = "raw";
StacktraceOption["PRETTY"] = "pretty";
})(StacktraceOption = exports.StacktraceOption || (exports.StacktraceOption = {}));
var Configuration = /** @class */ (function () {
function Configuration() {
}
return Configuration;
}());
exports.Configuration = Configuration;
//# sourceMappingURL=configuration.js.map

View file

@ -0,0 +1,18 @@
/// <reference types="jasmine" />
import { Configuration } from "./configuration";
import { CustomReporterResult } from "./spec-reporter";
import { Theme } from "./theme";
import SuiteInfo = jasmine.SuiteInfo;
export declare class DisplayProcessor {
protected configuration: Configuration;
protected theme: Theme;
constructor(configuration: Configuration, theme: Theme);
displayJasmineStarted(info: SuiteInfo, log: string): string;
displaySuite(suite: CustomReporterResult, log: string): string;
displaySpecStarted(spec: CustomReporterResult, log: string): string;
displaySuccessfulSpec(spec: CustomReporterResult, log: string): string;
displayFailedSpec(spec: CustomReporterResult, log: string): string;
displaySpecErrorMessages(spec: CustomReporterResult, log: string): string;
displaySummaryErrorMessages(spec: CustomReporterResult, log: string): string;
displayPendingSpec(spec: CustomReporterResult, log: string): string;
}

View file

@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DisplayProcessor = void 0;
var DisplayProcessor = /** @class */ (function () {
function DisplayProcessor(configuration, theme) {
this.configuration = configuration;
this.theme = theme;
}
DisplayProcessor.prototype.displayJasmineStarted = function (info, log) {
return log;
};
DisplayProcessor.prototype.displaySuite = function (suite, log) {
return log;
};
DisplayProcessor.prototype.displaySpecStarted = function (spec, log) {
return log;
};
DisplayProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
return log;
};
DisplayProcessor.prototype.displayFailedSpec = function (spec, log) {
return log;
};
DisplayProcessor.prototype.displaySpecErrorMessages = function (spec, log) {
return log;
};
DisplayProcessor.prototype.displaySummaryErrorMessages = function (spec, log) {
return log;
};
DisplayProcessor.prototype.displayPendingSpec = function (spec, log) {
return log;
};
return DisplayProcessor;
}());
exports.DisplayProcessor = DisplayProcessor;
//# sourceMappingURL=display-processor.js.map

View file

@ -0,0 +1,2 @@
import { Configuration } from "../configuration";
export declare function init(configuration: Configuration): void;

View file

@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.init = void 0;
// tslint:disable-next-line:no-submodule-imports
var colors = require("colors/safe");
function init(configuration) {
colors.enabled = configuration.colors.enabled;
colors.setTheme({
failed: configuration.colors.failed,
pending: configuration.colors.pending,
successful: configuration.colors.successful,
prettyStacktraceFilename: configuration.colors.prettyStacktraceFilename,
prettyStacktraceLineNumber: configuration.colors.prettyStacktraceLineNumber,
prettyStacktraceColumnNumber: configuration.colors.prettyStacktraceColumnNumber,
prettyStacktraceError: configuration.colors.prettyStacktraceError,
});
}
exports.init = init;
//# sourceMappingURL=colors-display.js.map

View file

@ -0,0 +1,9 @@
interface String {
successful: string;
failed: string;
pending: string;
prettyStacktraceFilename: string;
prettyStacktraceLineNumber: string;
prettyStacktraceColumnNumber: string;
prettyStacktraceError: string;
}

View file

@ -0,0 +1 @@
//# sourceMappingURL=colors-theme.js.map

View file

@ -0,0 +1,26 @@
/// <reference types="jasmine" />
import { Configuration } from "../configuration";
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult, ExecutedSpecs } from "../spec-reporter";
import { Logger } from "./logger";
import SuiteInfo = jasmine.SuiteInfo;
export declare class ExecutionDisplay {
private configuration;
private logger;
private specs;
private static hasCustomDisplaySpecStarted;
private suiteHierarchy;
private suiteHierarchyDisplayed;
private hasCustomDisplaySpecStarted;
constructor(configuration: Configuration, logger: Logger, specs: ExecutedSpecs, displayProcessors: DisplayProcessor[]);
jasmineStarted(suiteInfo: SuiteInfo): void;
specStarted(result: CustomReporterResult): void;
successful(result: CustomReporterResult): void;
failed(result: CustomReporterResult): void;
pending(result: CustomReporterResult): void;
suiteStarted(result: CustomReporterResult): void;
suiteDone(result: CustomReporterResult): void;
private ensureSuiteDisplayed;
private displaySuite;
private computeSuiteIndent;
}

View file

@ -0,0 +1,118 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionDisplay = void 0;
var ExecutionDisplay = /** @class */ (function () {
function ExecutionDisplay(configuration, logger, specs, displayProcessors) {
this.configuration = configuration;
this.logger = logger;
this.specs = specs;
this.suiteHierarchy = [];
this.suiteHierarchyDisplayed = [];
this.hasCustomDisplaySpecStarted = ExecutionDisplay.hasCustomDisplaySpecStarted(displayProcessors);
}
ExecutionDisplay.hasCustomDisplaySpecStarted = function (processors) {
var isDisplayed = false;
processors.forEach(function (processor) {
var log = "foo";
var result = processor.displaySpecStarted({ id: "bar", description: "bar", fullName: "bar" }, log);
isDisplayed = isDisplayed || result !== log;
});
return isDisplayed;
};
ExecutionDisplay.prototype.jasmineStarted = function (suiteInfo) {
this.logger.process(suiteInfo, function (displayProcessor, object, log) {
return displayProcessor.displayJasmineStarted(object, log);
});
};
ExecutionDisplay.prototype.specStarted = function (result) {
if (this.hasCustomDisplaySpecStarted) {
this.ensureSuiteDisplayed();
this.logger.process(result, function (displayProcessor, object, log) {
return displayProcessor.displaySpecStarted(object, log);
});
}
};
ExecutionDisplay.prototype.successful = function (result) {
this.specs.successful.push(result);
if (this.configuration.spec.displaySuccessful) {
this.ensureSuiteDisplayed();
this.logger.process(result, function (displayProcessor, object, log) {
return displayProcessor.displaySuccessfulSpec(object, log);
});
}
};
ExecutionDisplay.prototype.failed = function (result) {
this.specs.failed.push(result);
if (this.configuration.spec.displayFailed) {
this.ensureSuiteDisplayed();
this.logger.process(result, function (displayProcessor, object, log) {
return displayProcessor.displayFailedSpec(object, log);
});
if (this.configuration.spec.displayErrorMessages) {
this.logger.increaseIndent();
this.logger.process(result, function (displayProcessor, object, log) {
return displayProcessor.displaySpecErrorMessages(object, log);
});
this.logger.decreaseIndent();
}
}
};
ExecutionDisplay.prototype.pending = function (result) {
this.specs.pending.push(result);
if (this.configuration.spec.displayPending) {
this.ensureSuiteDisplayed();
this.logger.process(result, function (displayProcessor, object, log) {
return displayProcessor.displayPendingSpec(object, log);
});
}
};
ExecutionDisplay.prototype.suiteStarted = function (result) {
this.suiteHierarchy.push(result);
};
ExecutionDisplay.prototype.suiteDone = function (result) {
if (result && result.failedExpectations && result.failedExpectations.length) {
this.failed(result);
}
var suite = this.suiteHierarchy.pop();
if (this.suiteHierarchyDisplayed[this.suiteHierarchyDisplayed.length - 1] === suite) {
this.suiteHierarchyDisplayed.pop();
}
this.logger.newLine();
this.logger.decreaseIndent();
};
ExecutionDisplay.prototype.ensureSuiteDisplayed = function () {
if (this.suiteHierarchy.length !== 0) {
for (var i = this.suiteHierarchyDisplayed.length; i < this.suiteHierarchy.length; i++) {
this.suiteHierarchyDisplayed.push(this.suiteHierarchy[i]);
this.displaySuite(this.suiteHierarchy[i]);
}
}
else {
var name = "Top level suite";
var topLevelSuite = {
description: name,
fullName: name,
id: name,
};
this.suiteHierarchy.push(topLevelSuite);
this.suiteHierarchyDisplayed.push(topLevelSuite);
this.displaySuite(topLevelSuite);
}
};
ExecutionDisplay.prototype.displaySuite = function (suite) {
this.logger.newLine();
this.computeSuiteIndent();
this.logger.process(suite, function (displayProcessor, object, log) {
return displayProcessor.displaySuite(object, log);
});
this.logger.increaseIndent();
};
ExecutionDisplay.prototype.computeSuiteIndent = function () {
var _this = this;
this.logger.resetIndent();
this.suiteHierarchyDisplayed.forEach(function () { return _this.logger.increaseIndent(); });
};
return ExecutionDisplay;
}());
exports.ExecutionDisplay = ExecutionDisplay;
//# sourceMappingURL=execution-display.js.map

View file

@ -0,0 +1,20 @@
/// <reference types="jasmine" />
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
export declare type ProcessFunction = (displayProcessor: DisplayProcessor, object: ProcessObject, log: string) => string;
export declare type ProcessObject = SuiteInfo | CustomReporterResult;
export declare class Logger {
private displayProcessors;
private print;
private indent;
private currentIndent;
private lastWasNewLine;
constructor(displayProcessors: DisplayProcessor[], print: (line: string) => void);
log(stuff: string): void;
process(object: ProcessObject, processFunction: ProcessFunction): void;
newLine(): void;
resetIndent(): void;
increaseIndent(): void;
decreaseIndent(): void;
}

View file

@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
var Logger = /** @class */ (function () {
function Logger(displayProcessors, print) {
this.displayProcessors = displayProcessors;
this.print = print;
this.indent = " ";
this.currentIndent = "";
this.lastWasNewLine = false;
}
Logger.prototype.log = function (stuff) {
var _this = this;
stuff.split("\n").forEach(function (line) {
_this.print(line !== "" ? _this.currentIndent + line : line);
});
this.lastWasNewLine = false;
};
Logger.prototype.process = function (object, processFunction) {
var log = "";
this.displayProcessors.forEach(function (displayProcessor) {
log = processFunction(displayProcessor, object, log);
});
this.log(log);
};
Logger.prototype.newLine = function () {
if (!this.lastWasNewLine) {
this.log("");
this.lastWasNewLine = true;
}
};
Logger.prototype.resetIndent = function () {
this.currentIndent = "";
};
Logger.prototype.increaseIndent = function () {
this.currentIndent += this.indent;
};
Logger.prototype.decreaseIndent = function () {
this.currentIndent = this.currentIndent.substr(0, this.currentIndent.length - this.indent.length);
};
return Logger;
}());
exports.Logger = Logger;
//# sourceMappingURL=logger.js.map

View file

@ -0,0 +1,21 @@
import { Configuration } from "../configuration";
import { ExecutionMetrics } from "../execution-metrics";
import { ExecutedSpecs } from "../spec-reporter";
import { Theme } from "../theme";
import { Logger } from "./logger";
export declare class SummaryDisplay {
private configuration;
private theme;
private logger;
private specs;
constructor(configuration: Configuration, theme: Theme, logger: Logger, specs: ExecutedSpecs);
display(metrics: ExecutionMetrics): void;
private successesSummary;
private successfulSummary;
private failuresSummary;
private failedSummary;
private pendingsSummary;
private pendingSummary;
private errorsSummary;
private errorSummary;
}

View file

@ -0,0 +1,124 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SummaryDisplay = void 0;
var SummaryDisplay = /** @class */ (function () {
function SummaryDisplay(configuration, theme, logger, specs) {
this.configuration = configuration;
this.theme = theme;
this.logger = logger;
this.specs = specs;
}
SummaryDisplay.prototype.display = function (metrics) {
var pluralizedSpec = (metrics.totalSpecsDefined === 1 ? " spec" : " specs");
var execution = "Executed " + metrics.executedSpecs + " of " + metrics.totalSpecsDefined + pluralizedSpec;
var status = "";
if (metrics.failedSpecs === 0 && metrics.globalErrors.length === 0) {
status = (metrics.totalSpecsDefined === metrics.executedSpecs) ?
this.theme.successful(" SUCCESS") : this.theme.pending(" INCOMPLETE");
}
var failed = (metrics.failedSpecs > 0) ? " (" + metrics.failedSpecs + " FAILED)" : "";
var pending = (metrics.pendingSpecs > 0) ? " (" + metrics.pendingSpecs + " PENDING)" : "";
var skipped = (metrics.skippedSpecs > 0) ? " (" + metrics.skippedSpecs + " SKIPPED)" : "";
var errors = (metrics.globalErrors.length > 1) ? " (" + metrics.globalErrors.length + " ERRORS)" : "";
errors = (metrics.globalErrors.length === 1) ? " (" + metrics.globalErrors.length + " ERROR)" : errors;
var duration = this.configuration.summary.displayDuration ? " in " + metrics.duration : "";
this.logger.resetIndent();
this.logger.newLine();
if (this.configuration.summary.displaySuccessful && metrics.successfulSpecs > 0) {
this.successesSummary();
}
if (this.configuration.summary.displayFailed && metrics.failedSpecs > 0) {
this.failuresSummary();
}
if (this.configuration.summary.displayFailed && metrics.globalErrors.length > 0) {
this.errorsSummary(metrics.globalErrors);
}
if (this.configuration.summary.displayPending && metrics.pendingSpecs > 0) {
this.pendingsSummary();
}
this.logger.log(execution + status + this.theme.failed(errors) + this.theme.failed(failed)
+ this.theme.pending(pending) + this.theme.pending(skipped) + duration + ".");
if (metrics.random) {
this.logger.log("Randomized with seed " + metrics.seed + ".");
}
};
SummaryDisplay.prototype.successesSummary = function () {
this.logger.log("**************************************************");
this.logger.log("* Successes *");
this.logger.log("**************************************************");
this.logger.newLine();
for (var i = 0; i < this.specs.successful.length; i++) {
this.successfulSummary(this.specs.successful[i], i + 1);
this.logger.newLine();
}
this.logger.newLine();
this.logger.resetIndent();
};
SummaryDisplay.prototype.successfulSummary = function (spec, index) {
this.logger.log(index + ") " + spec.fullName);
};
SummaryDisplay.prototype.failuresSummary = function () {
this.logger.log("**************************************************");
this.logger.log("* Failures *");
this.logger.log("**************************************************");
this.logger.newLine();
for (var i = 0; i < this.specs.failed.length; i++) {
this.failedSummary(this.specs.failed[i], i + 1);
this.logger.newLine();
}
this.logger.newLine();
this.logger.resetIndent();
};
SummaryDisplay.prototype.failedSummary = function (spec, index) {
this.logger.log(index + ") " + spec.fullName);
if (this.configuration.summary.displayErrorMessages) {
this.logger.increaseIndent();
this.logger.process(spec, function (displayProcessor, object, log) {
return displayProcessor.displaySummaryErrorMessages(object, log);
});
this.logger.decreaseIndent();
}
};
SummaryDisplay.prototype.pendingsSummary = function () {
this.logger.log("**************************************************");
this.logger.log("* Pending *");
this.logger.log("**************************************************");
this.logger.newLine();
for (var i = 0; i < this.specs.pending.length; i++) {
this.pendingSummary(this.specs.pending[i], i + 1);
this.logger.newLine();
}
this.logger.newLine();
this.logger.resetIndent();
};
SummaryDisplay.prototype.pendingSummary = function (spec, index) {
this.logger.log(index + ") " + spec.fullName);
this.logger.increaseIndent();
var pendingReason = spec.pendingReason ? spec.pendingReason : "No reason given";
this.logger.log(this.theme.pending(pendingReason));
this.logger.resetIndent();
};
SummaryDisplay.prototype.errorsSummary = function (errors) {
this.logger.log("**************************************************");
this.logger.log("* Errors *");
this.logger.log("**************************************************");
this.logger.newLine();
for (var i = 0; i < errors.length; i++) {
this.errorSummary(errors[i], i + 1);
this.logger.newLine();
}
this.logger.newLine();
this.logger.resetIndent();
};
SummaryDisplay.prototype.errorSummary = function (error, index) {
this.logger.log(index + ") " + error.fullName);
this.logger.increaseIndent();
this.logger.process(error, function (displayProcessor, object, log) {
return displayProcessor.displaySummaryErrorMessages(object, log);
});
this.logger.decreaseIndent();
};
return SummaryDisplay;
}());
exports.SummaryDisplay = SummaryDisplay;
//# sourceMappingURL=summary-display.js.map

View file

@ -0,0 +1,24 @@
/// <reference types="jasmine" />
import { CustomReporterResult } from "./spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
import RunDetails = jasmine.RunDetails;
export declare class ExecutionMetrics {
private static pluralize;
successfulSpecs: number;
failedSpecs: number;
pendingSpecs: number;
skippedSpecs: number;
totalSpecsDefined: number;
executedSpecs: number;
globalErrors: CustomReporterResult[];
duration: string;
random: boolean;
seed: string;
private startTime;
private specStartTime;
start(suiteInfo: SuiteInfo): void;
stop(runDetails: RunDetails): void;
startSpec(): void;
stopSpec(result: CustomReporterResult): void;
private formatDuration;
}

View file

@ -0,0 +1,67 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionMetrics = void 0;
var ExecutionMetrics = /** @class */ (function () {
function ExecutionMetrics() {
this.successfulSpecs = 0;
this.failedSpecs = 0;
this.pendingSpecs = 0;
this.skippedSpecs = 0;
this.totalSpecsDefined = 0;
this.executedSpecs = 0;
this.globalErrors = [];
this.random = false;
}
ExecutionMetrics.pluralize = function (count) {
return count > 1 ? "s" : "";
};
ExecutionMetrics.prototype.start = function (suiteInfo) {
this.startTime = (new Date()).getTime();
this.totalSpecsDefined = suiteInfo && suiteInfo.totalSpecsDefined ? suiteInfo.totalSpecsDefined : 0;
};
ExecutionMetrics.prototype.stop = function (runDetails) {
var totalSpecs = this.failedSpecs + this.successfulSpecs + this.pendingSpecs;
this.duration = this.formatDuration((new Date()).getTime() - this.startTime);
this.executedSpecs = this.failedSpecs + this.successfulSpecs;
this.totalSpecsDefined = this.totalSpecsDefined ? this.totalSpecsDefined : totalSpecs;
this.skippedSpecs = this.totalSpecsDefined - totalSpecs;
this.random = runDetails.order.random;
this.seed = runDetails.order.seed;
};
ExecutionMetrics.prototype.startSpec = function () {
this.specStartTime = (new Date()).getTime();
};
ExecutionMetrics.prototype.stopSpec = function (result) {
result.duration = this.formatDuration((new Date()).getTime() - this.specStartTime);
};
ExecutionMetrics.prototype.formatDuration = function (durationInMs) {
var duration = "";
var durationInSecs = durationInMs / 1000;
var durationInMins;
var durationInHrs;
if (durationInSecs < 1) {
return durationInSecs + " sec" + ExecutionMetrics.pluralize(durationInSecs);
}
durationInSecs = Math.round(durationInSecs);
if (durationInSecs < 60) {
return durationInSecs + " sec" + ExecutionMetrics.pluralize(durationInSecs);
}
durationInMins = Math.floor(durationInSecs / 60);
durationInSecs = durationInSecs % 60;
if (durationInSecs) {
duration = " " + durationInSecs + " sec" + ExecutionMetrics.pluralize(durationInSecs);
}
if (durationInMins < 60) {
return durationInMins + " min" + ExecutionMetrics.pluralize(durationInMins) + duration;
}
durationInHrs = Math.floor(durationInMins / 60);
durationInMins = durationInMins % 60;
if (durationInMins) {
duration = " " + durationInMins + " min" + ExecutionMetrics.pluralize(durationInMins) + duration;
}
return durationInHrs + " hour" + ExecutionMetrics.pluralize(durationInHrs) + duration;
};
return ExecutionMetrics;
}());
exports.ExecutionMetrics = ExecutionMetrics;
//# sourceMappingURL=execution-metrics.js.map

3
node_modules/jasmine-spec-reporter/built/main.d.ts generated vendored Normal file
View file

@ -0,0 +1,3 @@
export { SpecReporter } from "./spec-reporter";
export { DisplayProcessor } from "./display-processor";
export { StacktraceOption } from "./configuration";

9
node_modules/jasmine-spec-reporter/built/main.js generated vendored Normal file
View file

@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var spec_reporter_1 = require("./spec-reporter");
Object.defineProperty(exports, "SpecReporter", { enumerable: true, get: function () { return spec_reporter_1.SpecReporter; } });
var display_processor_1 = require("./display-processor");
Object.defineProperty(exports, "DisplayProcessor", { enumerable: true, get: function () { return display_processor_1.DisplayProcessor; } });
var configuration_1 = require("./configuration");
Object.defineProperty(exports, "StacktraceOption", { enumerable: true, get: function () { return configuration_1.StacktraceOption; } });
//# sourceMappingURL=main.js.map

View file

@ -0,0 +1,13 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class DefaultProcessor extends DisplayProcessor {
private static displaySpecDescription;
displayJasmineStarted(): string;
displaySuite(suite: CustomReporterResult): string;
displaySuccessfulSpec(spec: CustomReporterResult): string;
displayFailedSpec(spec: CustomReporterResult): string;
displaySpecErrorMessages(spec: CustomReporterResult): string;
displaySummaryErrorMessages(spec: CustomReporterResult): string;
displayPendingSpec(spec: CustomReporterResult): string;
private displayErrorMessages;
}

View file

@ -0,0 +1,62 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultProcessor = void 0;
var configuration_1 = require("../configuration");
var display_processor_1 = require("../display-processor");
var DefaultProcessor = /** @class */ (function (_super) {
__extends(DefaultProcessor, _super);
function DefaultProcessor() {
return _super !== null && _super.apply(this, arguments) || this;
}
DefaultProcessor.displaySpecDescription = function (spec) {
return spec.description;
};
DefaultProcessor.prototype.displayJasmineStarted = function () {
return "Jasmine started";
};
DefaultProcessor.prototype.displaySuite = function (suite) {
return suite.description;
};
DefaultProcessor.prototype.displaySuccessfulSpec = function (spec) {
return DefaultProcessor.displaySpecDescription(spec);
};
DefaultProcessor.prototype.displayFailedSpec = function (spec) {
return DefaultProcessor.displaySpecDescription(spec);
};
DefaultProcessor.prototype.displaySpecErrorMessages = function (spec) {
return this.displayErrorMessages(spec, this.configuration.spec.displayStacktrace);
};
DefaultProcessor.prototype.displaySummaryErrorMessages = function (spec) {
return this.displayErrorMessages(spec, this.configuration.summary.displayStacktrace);
};
DefaultProcessor.prototype.displayPendingSpec = function (spec) {
return DefaultProcessor.displaySpecDescription(spec);
};
DefaultProcessor.prototype.displayErrorMessages = function (spec, stacktraceOption) {
var logs = [];
for (var _i = 0, _a = spec.failedExpectations; _i < _a.length; _i++) {
var failedExpectation = _a[_i];
logs.push(this.theme.failed("- ") + this.theme.failed(failedExpectation.message));
if (stacktraceOption === configuration_1.StacktraceOption.RAW && failedExpectation.stack) {
logs.push(this.configuration.stacktrace.filter(failedExpectation.stack));
}
}
return logs.join("\n");
};
return DefaultProcessor;
}(display_processor_1.DisplayProcessor));
exports.DefaultProcessor = DefaultProcessor;
//# sourceMappingURL=default-processor.js.map

View file

@ -0,0 +1,9 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class PrettyStacktraceProcessor extends DisplayProcessor {
displaySpecErrorMessages(spec: CustomReporterResult, log: string): string;
displaySummaryErrorMessages(spec: CustomReporterResult, log: string): string;
private displayErrorMessages;
private prettifyStack;
private retrieveErrorContext;
}

View file

@ -0,0 +1,83 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrettyStacktraceProcessor = void 0;
var fs = require("fs");
var configuration_1 = require("../configuration");
var display_processor_1 = require("../display-processor");
var STACK_REG_EXP = /\((.*):(\d+):(\d+)\)/;
var CONTEXT = 2;
var PrettyStacktraceProcessor = /** @class */ (function (_super) {
__extends(PrettyStacktraceProcessor, _super);
function PrettyStacktraceProcessor() {
return _super !== null && _super.apply(this, arguments) || this;
}
PrettyStacktraceProcessor.prototype.displaySpecErrorMessages = function (spec, log) {
return this.configuration.spec.displayStacktrace === configuration_1.StacktraceOption.PRETTY ? this.displayErrorMessages(spec) : log;
};
PrettyStacktraceProcessor.prototype.displaySummaryErrorMessages = function (spec, log) {
return this.configuration.summary.displayStacktrace === configuration_1.StacktraceOption.PRETTY ? this.displayErrorMessages(spec) : log;
};
PrettyStacktraceProcessor.prototype.displayErrorMessages = function (spec) {
var logs = [];
for (var _i = 0, _a = spec.failedExpectations; _i < _a.length; _i++) {
var failedExpectation = _a[_i];
logs.push(this.theme.failed("- ") + this.theme.failed(failedExpectation.message));
if (failedExpectation.stack) {
logs.push(this.prettifyStack(failedExpectation.stack));
}
}
return logs.join("\n");
};
PrettyStacktraceProcessor.prototype.prettifyStack = function (stack) {
var _this = this;
var logs = [];
var filteredStack = this.configuration.stacktrace.filter(stack);
var stackRegExp = new RegExp(STACK_REG_EXP);
filteredStack.split("\n").forEach(function (stackLine) {
if (stackRegExp.test(stackLine)) {
var _a = stackLine.match(stackRegExp), filename = _a[1], lineNumber = _a[2], columnNumber = _a[3];
var errorContext = _this.retrieveErrorContext(filename, parseInt(lineNumber, 10), parseInt(columnNumber, 10));
logs.push(_this.theme.prettyStacktraceFilename(filename) + ":" + _this.theme.prettyStacktraceLineNumber(lineNumber) + ":" + _this.theme.prettyStacktraceColumnNumber(columnNumber));
logs.push(errorContext + "\n");
}
});
return "\n" + logs.join("\n");
};
PrettyStacktraceProcessor.prototype.retrieveErrorContext = function (filename, lineNb, columnNb) {
var logs = [];
var fileLines;
try {
fileLines = fs.readFileSync(filename, "utf-8")
.split("\n");
}
catch (error) {
return "jasmine-spec-reporter: unable to open '" + filename + "'\n" + error;
}
for (var i = 0; i < fileLines.length; i++) {
var errorLine = lineNb - 1;
if (i >= errorLine - CONTEXT && i <= errorLine + CONTEXT) {
logs.push(fileLines[i]);
}
if (i === errorLine) {
logs.push(" ".repeat(columnNb - 1) + this.theme.prettyStacktraceError("~"));
}
}
return logs.join("\n");
};
return PrettyStacktraceProcessor;
}(display_processor_1.DisplayProcessor));
exports.PrettyStacktraceProcessor = PrettyStacktraceProcessor;
//# sourceMappingURL=pretty-stacktrace-processor.js.map

View file

@ -0,0 +1,7 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class SpecColorsProcessor extends DisplayProcessor {
displaySuccessfulSpec(spec: CustomReporterResult, log: string): string;
displayFailedSpec(spec: CustomReporterResult, log: string): string;
displayPendingSpec(spec: CustomReporterResult, log: string): string;
}

View file

@ -0,0 +1,35 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpecColorsProcessor = void 0;
var display_processor_1 = require("../display-processor");
var SpecColorsProcessor = /** @class */ (function (_super) {
__extends(SpecColorsProcessor, _super);
function SpecColorsProcessor() {
return _super !== null && _super.apply(this, arguments) || this;
}
SpecColorsProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
return this.theme.successful(log);
};
SpecColorsProcessor.prototype.displayFailedSpec = function (spec, log) {
return this.theme.failed(log);
};
SpecColorsProcessor.prototype.displayPendingSpec = function (spec, log) {
return this.theme.pending(log);
};
return SpecColorsProcessor;
}(display_processor_1.DisplayProcessor));
exports.SpecColorsProcessor = SpecColorsProcessor;
//# sourceMappingURL=spec-colors-processor.js.map

View file

@ -0,0 +1,7 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class SpecDurationsProcessor extends DisplayProcessor {
private static displayDuration;
displaySuccessfulSpec(spec: CustomReporterResult, log: string): string;
displayFailedSpec(spec: CustomReporterResult, log: string): string;
}

View file

@ -0,0 +1,35 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpecDurationsProcessor = void 0;
var display_processor_1 = require("../display-processor");
var SpecDurationsProcessor = /** @class */ (function (_super) {
__extends(SpecDurationsProcessor, _super);
function SpecDurationsProcessor() {
return _super !== null && _super.apply(this, arguments) || this;
}
SpecDurationsProcessor.displayDuration = function (spec, log) {
return log + " (" + spec.duration + ")";
};
SpecDurationsProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
return SpecDurationsProcessor.displayDuration(spec, log);
};
SpecDurationsProcessor.prototype.displayFailedSpec = function (spec, log) {
return SpecDurationsProcessor.displayDuration(spec, log);
};
return SpecDurationsProcessor;
}(display_processor_1.DisplayProcessor));
exports.SpecDurationsProcessor = SpecDurationsProcessor;
//# sourceMappingURL=spec-durations-processor.js.map

View file

@ -0,0 +1,7 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class SpecPrefixesProcessor extends DisplayProcessor {
displaySuccessfulSpec(spec: CustomReporterResult, log: string): string;
displayFailedSpec(spec: CustomReporterResult, log: string): string;
displayPendingSpec(spec: CustomReporterResult, log: string): string;
}

View file

@ -0,0 +1,35 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpecPrefixesProcessor = void 0;
var display_processor_1 = require("../display-processor");
var SpecPrefixesProcessor = /** @class */ (function (_super) {
__extends(SpecPrefixesProcessor, _super);
function SpecPrefixesProcessor() {
return _super !== null && _super.apply(this, arguments) || this;
}
SpecPrefixesProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
return this.configuration.prefixes.successful + log;
};
SpecPrefixesProcessor.prototype.displayFailedSpec = function (spec, log) {
return this.configuration.prefixes.failed + log;
};
SpecPrefixesProcessor.prototype.displayPendingSpec = function (spec, log) {
return this.configuration.prefixes.pending + log;
};
return SpecPrefixesProcessor;
}(display_processor_1.DisplayProcessor));
exports.SpecPrefixesProcessor = SpecPrefixesProcessor;
//# sourceMappingURL=spec-prefixes-processor.js.map

View file

@ -0,0 +1,10 @@
import { DisplayProcessor } from "../display-processor";
import { CustomReporterResult } from "../spec-reporter";
export declare class SuiteNumberingProcessor extends DisplayProcessor {
private static getParentName;
private suiteHierarchy;
displaySuite(suite: CustomReporterResult, log: string): string;
private computeNumber;
private computeHierarchy;
private computeHierarchyNumber;
}

View file

@ -0,0 +1,60 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SuiteNumberingProcessor = void 0;
var display_processor_1 = require("../display-processor");
var SuiteNumberingProcessor = /** @class */ (function (_super) {
__extends(SuiteNumberingProcessor, _super);
function SuiteNumberingProcessor() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.suiteHierarchy = [];
return _this;
}
SuiteNumberingProcessor.getParentName = function (element) {
return element.fullName.replace(element.description, "").trim();
};
SuiteNumberingProcessor.prototype.displaySuite = function (suite, log) {
return this.computeNumber(suite) + " " + log;
};
SuiteNumberingProcessor.prototype.computeNumber = function (suite) {
this.computeHierarchy(suite);
return this.computeHierarchyNumber();
};
SuiteNumberingProcessor.prototype.computeHierarchy = function (suite) {
var parentName = SuiteNumberingProcessor.getParentName(suite);
var i = 0;
for (; i < this.suiteHierarchy.length; i++) {
if (this.suiteHierarchy[i].name === parentName) {
this.suiteHierarchy[i].number++;
this.suiteHierarchy.splice(i + 1, this.suiteHierarchy.length - i - 1);
break;
}
}
if (i === this.suiteHierarchy.length) {
this.suiteHierarchy.push({ name: parentName, number: 1 });
}
};
SuiteNumberingProcessor.prototype.computeHierarchyNumber = function () {
var hierarchyNumber = "";
for (var _i = 0, _a = this.suiteHierarchy; _i < _a.length; _i++) {
var suite = _a[_i];
hierarchyNumber += suite.number + ".";
}
return hierarchyNumber.substring(0, hierarchyNumber.length - 1);
};
return SuiteNumberingProcessor;
}(display_processor_1.DisplayProcessor));
exports.SuiteNumberingProcessor = SuiteNumberingProcessor;
//# sourceMappingURL=suite-numbering-processor.js.map

View file

@ -0,0 +1,31 @@
/// <reference types="jasmine" />
import { Configuration } from "./configuration";
import CustomReporter = jasmine.CustomReporter;
import SuiteInfo = jasmine.SuiteInfo;
import RunDetails = jasmine.RunDetails;
export interface CustomReporterResult extends jasmine.CustomReporterResult {
duration?: string;
}
export interface ExecutedSpecs {
failed: CustomReporterResult[];
pending: CustomReporterResult[];
successful: CustomReporterResult[];
}
export declare class SpecReporter implements CustomReporter {
private static initProcessors;
private logger;
private specs;
private display;
private summary;
private metrics;
private configuration;
private theme;
constructor(configuration?: Configuration);
jasmineStarted(suiteInfo: SuiteInfo): void;
jasmineDone(runDetails: RunDetails): void;
suiteStarted(result: CustomReporterResult): void;
suiteDone(result: CustomReporterResult): void;
specStarted(result: CustomReporterResult): void;
specDone(result: CustomReporterResult): void;
private runDetailsToResult;
}

View file

@ -0,0 +1,113 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpecReporter = void 0;
var ConfigurationParser = require("./configuration-parser");
var execution_display_1 = require("./display/execution-display");
var logger_1 = require("./display/logger");
var summary_display_1 = require("./display/summary-display");
var execution_metrics_1 = require("./execution-metrics");
var default_processor_1 = require("./processors/default-processor");
var pretty_stacktrace_processor_1 = require("./processors/pretty-stacktrace-processor");
var spec_colors_processor_1 = require("./processors/spec-colors-processor");
var spec_durations_processor_1 = require("./processors/spec-durations-processor");
var spec_prefixes_processor_1 = require("./processors/spec-prefixes-processor");
var suite_numbering_processor_1 = require("./processors/suite-numbering-processor");
var theme_1 = require("./theme");
var SpecReporter = /** @class */ (function () {
function SpecReporter(configuration) {
this.specs = {
failed: [],
pending: [],
successful: []
};
this.configuration = ConfigurationParser.parse(configuration);
this.theme = new theme_1.Theme(this.configuration);
var displayProcessors = SpecReporter.initProcessors(this.configuration, this.theme);
var print = this.configuration.print;
this.logger = new logger_1.Logger(displayProcessors, print);
this.display = new execution_display_1.ExecutionDisplay(this.configuration, this.logger, this.specs, displayProcessors);
this.summary = new summary_display_1.SummaryDisplay(this.configuration, this.theme, this.logger, this.specs);
this.metrics = new execution_metrics_1.ExecutionMetrics();
}
SpecReporter.initProcessors = function (configuration, theme) {
var displayProcessors = [
new default_processor_1.DefaultProcessor(configuration, theme),
new spec_prefixes_processor_1.SpecPrefixesProcessor(configuration, theme),
new spec_colors_processor_1.SpecColorsProcessor(configuration, theme),
new pretty_stacktrace_processor_1.PrettyStacktraceProcessor(configuration, theme)
];
if (configuration.spec.displayDuration) {
displayProcessors.push(new spec_durations_processor_1.SpecDurationsProcessor(configuration, theme));
}
if (configuration.suite.displayNumber) {
displayProcessors.push(new suite_numbering_processor_1.SuiteNumberingProcessor(configuration, theme));
}
if (configuration.customProcessors) {
configuration.customProcessors.forEach(function (Processor) {
displayProcessors.push(new Processor(configuration, theme));
});
}
return displayProcessors;
};
SpecReporter.prototype.jasmineStarted = function (suiteInfo) {
this.metrics.start(suiteInfo);
this.display.jasmineStarted(suiteInfo);
};
SpecReporter.prototype.jasmineDone = function (runDetails) {
this.metrics.stop(runDetails);
if (runDetails.failedExpectations && runDetails.failedExpectations.length) {
var error = this.runDetailsToResult(runDetails);
this.metrics.globalErrors.push(error);
this.display.failed(error);
}
this.summary.display(this.metrics);
};
SpecReporter.prototype.suiteStarted = function (result) {
this.display.suiteStarted(result);
};
SpecReporter.prototype.suiteDone = function (result) {
this.display.suiteDone(result);
if (result.failedExpectations.length) {
this.metrics.globalErrors.push(result);
}
};
SpecReporter.prototype.specStarted = function (result) {
this.metrics.startSpec();
this.display.specStarted(result);
};
SpecReporter.prototype.specDone = function (result) {
this.metrics.stopSpec(result);
if (result.status === "pending") {
this.metrics.pendingSpecs++;
this.display.pending(result);
}
else if (result.status === "passed") {
this.metrics.successfulSpecs++;
this.display.successful(result);
}
else if (result.status === "failed") {
this.metrics.failedSpecs++;
this.display.failed(result);
}
};
SpecReporter.prototype.runDetailsToResult = function (runDetails) {
return {
description: "Non-spec failure",
failedExpectations: runDetails.failedExpectations.map(function (expectation) {
return {
actual: "",
expected: "",
matcherName: "",
message: expectation.message,
passed: false,
stack: expectation.stack,
};
}),
fullName: "Non-spec failure",
id: "Non-spec failure",
};
};
return SpecReporter;
}());
exports.SpecReporter = SpecReporter;
//# sourceMappingURL=spec-reporter.js.map

11
node_modules/jasmine-spec-reporter/built/theme.d.ts generated vendored Normal file
View file

@ -0,0 +1,11 @@
import { Configuration } from "./configuration";
export declare class Theme {
constructor(configuration: Configuration);
successful(str: string): string;
failed(str: string): string;
pending(str: string): string;
prettyStacktraceFilename(str: string): string;
prettyStacktraceLineNumber(str: string): string;
prettyStacktraceColumnNumber(str: string): string;
prettyStacktraceError(str: string): string;
}

44
node_modules/jasmine-spec-reporter/built/theme.js generated vendored Normal file
View file

@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Theme = void 0;
// tslint:disable-next-line:no-submodule-imports
var colors = require("colors/safe");
var colorsTheme = colors;
var Theme = /** @class */ (function () {
function Theme(configuration) {
configuration.colors.enabled ? colors.enable() : colors.disable();
colors.setTheme({
failed: configuration.colors.failed,
pending: configuration.colors.pending,
successful: configuration.colors.successful,
prettyStacktraceFilename: configuration.colors.prettyStacktraceFilename,
prettyStacktraceLineNumber: configuration.colors.prettyStacktraceLineNumber,
prettyStacktraceColumnNumber: configuration.colors.prettyStacktraceColumnNumber,
prettyStacktraceError: configuration.colors.prettyStacktraceError,
});
}
Theme.prototype.successful = function (str) {
return colorsTheme.successful(str);
};
Theme.prototype.failed = function (str) {
return colorsTheme.failed(str);
};
Theme.prototype.pending = function (str) {
return colorsTheme.pending(str);
};
Theme.prototype.prettyStacktraceFilename = function (str) {
return colorsTheme.prettyStacktraceFilename(str);
};
Theme.prototype.prettyStacktraceLineNumber = function (str) {
return colorsTheme.prettyStacktraceLineNumber(str);
};
Theme.prototype.prettyStacktraceColumnNumber = function (str) {
return colorsTheme.prettyStacktraceColumnNumber(str);
};
Theme.prototype.prettyStacktraceError = function (str) {
return colorsTheme.prettyStacktraceError(str);
};
return Theme;
}());
exports.Theme = Theme;
//# sourceMappingURL=theme.js.map

View file

@ -0,0 +1,87 @@
Output customization
====================
If you want to add extra information to the reporter output, you can build your own display processor and add it to options in the customProcessors array.
# Example
Let's say that you want to add the current time before each output of the reporter in order to have something like this:
Spec started
10:40:12 - first suite
10:40:12 - ✓ should be ok
10:40:21 - ✗ should failed
- Expected true to be false.
10:40:35 - ✓ should be ok
## Build your display processor
You need to require the display processor:
```node
var DisplayProcessor = require('jasmine-spec-reporter').DisplayProcessor;
```
You can then customize the following methods:
* displayJasmineStarted(runner, log)
* displaySuite(suite, log)
* displaySpecStarted(spec, log)
* displaySuccessfulSpec(spec, log)
* displayFailedSpec(spec, log)
* displaySpecErrorMessages(spec, log)
* displaySummaryErrorMessages(spec, log)
* displayPendingSpec(spec, log)
The first argument is the jasmine object corresponding to the suite or the spec. The second argument is the log to be displayed. Those methods should return the modified log.
For our example:
```node
var DisplayProcessor = require('jasmine-spec-reporter').DisplayProcessor;
function TimeProcessor(configuration, theme) {
}
function getTime() {
var now = new Date();
return now.getHours() + ':' +
now.getMinutes() + ':' +
now.getSeconds()
}
TimeProcessor.prototype = new DisplayProcessor();
TimeProcessor.prototype.displaySuite = function (suite, log) {
return getTime() + ' - ' + log;
};
TimeProcessor.prototype.displaySuccessfulSpec = function (spec, log) {
return getTime() + ' - ' + log;
};
TimeProcessor.prototype.displayFailedSpec = function (spec, log) {
return getTime() + ' - ' + log;
};
TimeProcessor.prototype.displayPendingSpec = function (spec, log) {
return getTime() + ' - ' + log;
};
```
## Add it to the configuration
Then you need to configure jasmine spec reporter to use your processor:
```node
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var reporter = new SpecReporter({
customProcessors: [TimeProcessor]
});
jasmine.getEnv().addReporter(reporter);
```
You must pass the processor constructor in the customProcessors array. Jasmine spec reporter will instantiate it with the options if you need them. You can add as many processors as you want, they will be applied in the order which they are in the customProcessors array.

View file

@ -0,0 +1,9 @@
Examples
========
To launch one of this examples:
* Clone this repository
* Install dependencies
* Go to your wanted example directory
* Follow the README.md instructions

View file

@ -0,0 +1,29 @@
Use jasmine-spec-reporter with Node
===================================
The `jasmine-spec-reporter` can be used to enhance your
[jasmine node](https://github.com/jasmine/jasmine-npm) tests execution report.
## Configuration
Create a `spec/helpers/reporter.js` file with the following content:
```javascript
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.getEnv().clearReporters(); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({ // add jasmine-spec-reporter
spec: {
displayPending: true
}
}));
```
Then run your tests!
## Example
This directory is setup as a working example, so you can inspect the `package.json`,
the `spec` directory, and you can see it all work by issuing the following commands:
npm install
npm test

View file

@ -0,0 +1,14 @@
{
"name": "node-example",
"version": "1.0.0",
"description": "a node example",
"scripts": {
"test": "jasmine"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"jasmine": "file:../../node_modules/jasmine",
"jasmine-spec-reporter": "file:../../"
}
}

View file

@ -0,0 +1,11 @@
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.getEnv().clearReporters(); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({ // add jasmine-spec-reporter
spec: {
displayPending: true,
},
summary: {
displayDuration: false,
}
}));

View file

@ -0,0 +1,56 @@
describe('first suite', () => {
it('should be ok', () => {
expect(true).toBe(true);
});
it('should be pending', () => {
pending('will work soon');
expect(true).toBe(true);
});
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
describe('second suite', () => {
xit('should be pending', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
describe('first child suite', () => {
describe('first grandchild suite', () => {
it('should failed', () => {
expect(true).toBe(false);
expect(true).toBe(false);
expect(true).toBe(true);
});
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
describe('second grandchild suite', () => {
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
});
});

View file

@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

View file

@ -0,0 +1,41 @@
Use jasmine-spec-reporter with Protractor
=========================================
The `jasmine-spec-reporter` can be used to enhance your [Protractor](https://github.com/angular/protractor) tests execution report.
## Protractor configuration
In your Protractor configuration file:
```javascript
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
// your config here ...
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
}
}));
}
}
```
## Remove protractor dot reporter
In your protractor configuration file, add the print function in the `jasmineNodeOpts` section:
```javascript
jasmineNodeOpts: {
...
print: function() {}
}
```
## Example
You can find an example in this directory:
```bash
npm install
npm test
```

View file

@ -0,0 +1,18 @@
{
"name": "protractor-example",
"version": "1.0.0",
"description": "a protractor example",
"scripts": {
"postinstall": "webdriver-manager update --gecko false --versions.chrome=83.0.4103.39",
"test": "protractor protractor.conf.js"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"jasmine-spec-reporter": "file:../../"
},
"devDependencies": {
"protractor": "^5.4.2",
"webdriver-manager": "^12.1.5"
}
}

View file

@ -0,0 +1,32 @@
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
silent: true,
defaultTimeoutInterval: 360000,
print: function () {
}
},
specs: [
'./spec/protractor-spec.js'
],
capabilities: {
browserName: 'chrome',
'chromeOptions': {
args: ['--test-type']
}
},
logLevel: 'WARN',
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
},
summary: {
displayDuration: false
}
}));
}
};

View file

@ -0,0 +1,11 @@
describe('angularjs homepage', () => {
it('should greet the named user', () => {
browser.get('http://www.angularjs.org');
element(by.model('yourName')).sendKeys('Julie');
const greeting = element(by.binding('yourName'));
expect(greeting.getText()).toEqual('Hello Julie!');
})
});

View file

@ -0,0 +1,30 @@
Use jasmine-spec-reporter with TypeScript
=========================================
## Configuration
```typescript
import {DisplayProcessor, SpecReporter, StacktraceOption} from "jasmine-spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
class CustomProcessor extends DisplayProcessor {
public displayJasmineStarted(info: SuiteInfo, log: string): string {
return `TypeScript ${log}`;
}
}
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.NONE
},
customProcessors: [CustomProcessor],
}));
```
## Example
You can find an example in this directory:
npm install
npm test

View file

@ -0,0 +1,18 @@
{
"name": "typescript-example",
"version": "1.0.0",
"description": "a typescript example",
"scripts": {
"tsc": "node node_modules/typescript/bin/tsc",
"pretest": "tsc",
"test": "jasmine"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"@types/jasmine": "file:../../node_modules/@types/jasmine",
"jasmine": "file:../../node_modules/jasmine",
"jasmine-spec-reporter": "file:../../",
"typescript": "file:../../node_modules/typescript"
}
}

View file

@ -0,0 +1,16 @@
import {DisplayProcessor, SpecReporter, StacktraceOption} from "jasmine-spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
class CustomProcessor extends DisplayProcessor {
public displayJasmineStarted(info: SuiteInfo, log: string): string {
return `TypeScript ${log}`;
}
}
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.NONE
},
customProcessors: [CustomProcessor],
}));

View file

@ -0,0 +1,5 @@
describe("first suite", () => {
it("should be ok", () => {
expect(true).toBe(true);
});
});

View file

@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

View file

@ -0,0 +1,25 @@
MIT License
Original Library
- Copyright (c) Marak Squires
Additional Functionality
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -0,0 +1,221 @@
# colors.js
[![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js)
[![version](https://img.shields.io/npm/v/colors.svg)](https://www.npmjs.org/package/colors)
[![dependencies](https://david-dm.org/Marak/colors.js.svg)](https://david-dm.org/Marak/colors.js)
[![devDependencies](https://david-dm.org/Marak/colors.js/dev-status.svg)](https://david-dm.org/Marak/colors.js#info=devDependencies)
Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. Please open Issues to provide feedback, and check the `develop` branch for the latest bleeding-edge updates.
## get color and style in your node.js console
![Demo](https://raw.githubusercontent.com/Marak/colors.js/master/screenshots/colors.png)
## Installation
npm install colors
## colors and styles!
### text colors
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
- grey
### bright text colors
- brightRed
- brightGreen
- brightYellow
- brightBlue
- brightMagenta
- brightCyan
- brightWhite
### background colors
- bgBlack
- bgRed
- bgGreen
- bgYellow
- bgBlue
- bgMagenta
- bgCyan
- bgWhite
- bgGray
- bgGrey
### bright background colors
- bgBrightRed
- bgBrightGreen
- bgBrightYellow
- bgBrightBlue
- bgBrightMagenta
- bgBrightCyan
- bgBrightWhite
### styles
- reset
- bold
- dim
- italic
- underline
- inverse
- hidden
- strikethrough
### extras
- rainbow
- zebra
- america
- trap
- random
## Usage
By popular demand, `colors` now ships with two types of usages!
The super nifty way
```js
var colors = require('colors');
console.log('hello'.green); // outputs green text
console.log('i like cake and pies'.underline.red) // outputs red underlined text
console.log('inverse the color'.inverse); // inverses the color
console.log('OMG Rainbows!'.rainbow); // rainbow
console.log('Run the trap'.trap); // Drops the bass
```
or a slightly less nifty way which doesn't extend `String.prototype`
```js
var colors = require('colors/safe');
console.log(colors.green('hello')); // outputs green text
console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text
console.log(colors.inverse('inverse the color')); // inverses the color
console.log(colors.rainbow('OMG Rainbows!')); // rainbow
console.log(colors.trap('Run the trap')); // Drops the bass
```
I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way.
If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object.
## Enabling/Disabling Colors
The package will auto-detect whether your terminal can use colors and enable/disable accordingly. When colors are disabled, the color functions do nothing. You can override this with a command-line flag:
```bash
node myapp.js --no-color
node myapp.js --color=false
node myapp.js --color
node myapp.js --color=true
node myapp.js --color=always
FORCE_COLOR=1 node myapp.js
```
Or in code:
```javascript
var colors = require('colors');
colors.enable();
colors.disable();
```
## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data)
```js
var name = 'Marak';
console.log(colors.green('Hello %s'), name);
// outputs -> 'Hello Marak'
```
## Custom themes
### Using standard API
```js
var colors = require('colors');
colors.setTheme({
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red'
});
// outputs red text
console.log("this is an error".error);
// outputs yellow text
console.log("this is a warning".warn);
```
### Using string safe API
```js
var colors = require('colors/safe');
// set single property
var error = colors.red;
error('this is red');
// set theme
colors.setTheme({
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red'
});
// outputs red text
console.log(colors.error("this is an error"));
// outputs yellow text
console.log(colors.warn("this is a warning"));
```
### Combining Colors
```javascript
var colors = require('colors');
colors.setTheme({
custom: ['red', 'underline']
});
console.log('test'.custom);
```
*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.*

View file

@ -0,0 +1,82 @@
var colors = require('../lib/index');
console.log('First some yellow text'.yellow);
console.log('Underline that text'.yellow.underline);
console.log('Make it bold and red'.red.bold);
console.log(('Double Raindows All Day Long').rainbow);
console.log('Drop the bass'.trap);
console.log('DROP THE RAINBOW BASS'.trap.rainbow);
// styles not widely supported
console.log('Chains are also cool.'.bold.italic.underline.red);
// styles not widely supported
console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse
+ ' styles! '.yellow.bold);
console.log('Zebras are so fun!'.zebra);
//
// Remark: .strikethrough may not work with Mac OS Terminal App
//
console.log('This is ' + 'not'.strikethrough + ' fun.');
console.log('Background color attack!'.black.bgWhite);
console.log('Use random styles on everything!'.random);
console.log('America, Heck Yeah!'.america);
console.log('Blindingly '.brightCyan + 'bright? '.brightRed + 'Why '.brightYellow + 'not?!'.brightGreen);
console.log('Setting themes is useful');
//
// Custom themes
//
console.log('Generic logging theme as JSON'.green.bold.underline);
// Load theme with JSON literal
colors.setTheme({
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red',
});
// outputs red text
console.log('this is an error'.error);
// outputs yellow text
console.log('this is a warning'.warn);
// outputs grey text
console.log('this is an input'.input);
console.log('Generic logging theme as file'.green.bold.underline);
// Load a theme from file
try {
colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
} catch (err) {
console.log(err);
}
// outputs red text
console.log('this is an error'.error);
// outputs yellow text
console.log('this is a warning'.warn);
// outputs grey text
console.log('this is an input'.input);
// console.log("Don't summon".zalgo)

View file

@ -0,0 +1,79 @@
var colors = require('../safe');
console.log(colors.yellow('First some yellow text'));
console.log(colors.yellow.underline('Underline that text'));
console.log(colors.red.bold('Make it bold and red'));
console.log(colors.rainbow('Double Raindows All Day Long'));
console.log(colors.trap('Drop the bass'));
console.log(colors.rainbow(colors.trap('DROP THE RAINBOW BASS')));
// styles not widely supported
console.log(colors.bold.italic.underline.red('Chains are also cool.'));
// styles not widely supported
console.log(colors.green('So ') + colors.underline('are') + ' '
+ colors.inverse('inverse') + colors.yellow.bold(' styles! '));
console.log(colors.zebra('Zebras are so fun!'));
console.log('This is ' + colors.strikethrough('not') + ' fun.');
console.log(colors.black.bgWhite('Background color attack!'));
console.log(colors.random('Use random styles on everything!'));
console.log(colors.america('America, Heck Yeah!'));
console.log(colors.brightCyan('Blindingly ') + colors.brightRed('bright? ') + colors.brightYellow('Why ') + colors.brightGreen('not?!'));
console.log('Setting themes is useful');
//
// Custom themes
//
// console.log('Generic logging theme as JSON'.green.bold.underline);
// Load theme with JSON literal
colors.setTheme({
silly: 'rainbow',
input: 'blue',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red',
});
// outputs red text
console.log(colors.error('this is an error'));
// outputs yellow text
console.log(colors.warn('this is a warning'));
// outputs blue text
console.log(colors.input('this is an input'));
// console.log('Generic logging theme as file'.green.bold.underline);
// Load a theme from file
colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));
// outputs red text
console.log(colors.error('this is an error'));
// outputs yellow text
console.log(colors.warn('this is a warning'));
// outputs grey text
console.log(colors.input('this is an input'));
// console.log(colors.zalgo("Don't summon him"))

View file

@ -0,0 +1,136 @@
// Type definitions for Colors.js 1.2
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
// Definitions: https://github.com/Marak/colors.js
export interface Color {
(text: string): string;
strip: Color;
stripColors: Color;
black: Color;
red: Color;
green: Color;
yellow: Color;
blue: Color;
magenta: Color;
cyan: Color;
white: Color;
gray: Color;
grey: Color;
bgBlack: Color;
bgRed: Color;
bgGreen: Color;
bgYellow: Color;
bgBlue: Color;
bgMagenta: Color;
bgCyan: Color;
bgWhite: Color;
reset: Color;
bold: Color;
dim: Color;
italic: Color;
underline: Color;
inverse: Color;
hidden: Color;
strikethrough: Color;
rainbow: Color;
zebra: Color;
america: Color;
trap: Color;
random: Color;
zalgo: Color;
}
export function enable(): void;
export function disable(): void;
export function setTheme(theme: any): void;
export let enabled: boolean;
export const strip: Color;
export const stripColors: Color;
export const black: Color;
export const red: Color;
export const green: Color;
export const yellow: Color;
export const blue: Color;
export const magenta: Color;
export const cyan: Color;
export const white: Color;
export const gray: Color;
export const grey: Color;
export const bgBlack: Color;
export const bgRed: Color;
export const bgGreen: Color;
export const bgYellow: Color;
export const bgBlue: Color;
export const bgMagenta: Color;
export const bgCyan: Color;
export const bgWhite: Color;
export const reset: Color;
export const bold: Color;
export const dim: Color;
export const italic: Color;
export const underline: Color;
export const inverse: Color;
export const hidden: Color;
export const strikethrough: Color;
export const rainbow: Color;
export const zebra: Color;
export const america: Color;
export const trap: Color;
export const random: Color;
export const zalgo: Color;
declare global {
interface String {
strip: string;
stripColors: string;
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
grey: string;
bgBlack: string;
bgRed: string;
bgGreen: string;
bgYellow: string;
bgBlue: string;
bgMagenta: string;
bgCyan: string;
bgWhite: string;
reset: string;
// @ts-ignore
bold: string;
dim: string;
italic: string;
underline: string;
inverse: string;
hidden: string;
strikethrough: string;
rainbow: string;
zebra: string;
america: string;
trap: string;
random: string;
zalgo: string;
}
}

View file

@ -0,0 +1,211 @@
/*
The MIT License (MIT)
Original Library
- Copyright (c) Marak Squires
Additional functionality
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var colors = {};
module['exports'] = colors;
colors.themes = {};
var util = require('util');
var ansiStyles = colors.styles = require('./styles');
var defineProps = Object.defineProperties;
var newLineRegex = new RegExp(/[\r\n]+/g);
colors.supportsColor = require('./system/supports-colors').supportsColor;
if (typeof colors.enabled === 'undefined') {
colors.enabled = colors.supportsColor() !== false;
}
colors.enable = function() {
colors.enabled = true;
};
colors.disable = function() {
colors.enabled = false;
};
colors.stripColors = colors.strip = function(str) {
return ('' + str).replace(/\x1B\[\d+m/g, '');
};
// eslint-disable-next-line no-unused-vars
var stylize = colors.stylize = function stylize(str, style) {
if (!colors.enabled) {
return str+'';
}
var styleMap = ansiStyles[style];
// Stylize should work for non-ANSI styles, too
if(!styleMap && style in colors){
// Style maps like trap operate as functions on strings;
// they don't have properties like open or close.
return colors[style](str);
}
return styleMap.open + str + styleMap.close;
};
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
var escapeStringRegexp = function(str) {
if (typeof str !== 'string') {
throw new TypeError('Expected a string');
}
return str.replace(matchOperatorsRe, '\\$&');
};
function build(_styles) {
var builder = function builder() {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
// __proto__ is used because we must return a function, but there is
// no way to create a function with a different prototype.
builder.__proto__ = proto;
return builder;
}
var styles = (function() {
var ret = {};
ansiStyles.grey = ansiStyles.gray;
Object.keys(ansiStyles).forEach(function(key) {
ansiStyles[key].closeRe =
new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
ret[key] = {
get: function() {
return build(this._styles.concat(key));
},
};
});
return ret;
})();
var proto = defineProps(function colors() {}, styles);
function applyStyle() {
var args = Array.prototype.slice.call(arguments);
var str = args.map(function(arg) {
// Use weak equality check so we can colorize null/undefined in safe mode
if (arg != null && arg.constructor === String) {
return arg;
} else {
return util.inspect(arg);
}
}).join(' ');
if (!colors.enabled || !str) {
return str;
}
var newLinesPresent = str.indexOf('\n') != -1;
var nestedStyles = this._styles;
var i = nestedStyles.length;
while (i--) {
var code = ansiStyles[nestedStyles[i]];
str = code.open + str.replace(code.closeRe, code.open) + code.close;
if (newLinesPresent) {
str = str.replace(newLineRegex, function(match) {
return code.close + match + code.open;
});
}
}
return str;
}
colors.setTheme = function(theme) {
if (typeof theme === 'string') {
console.log('colors.setTheme now only accepts an object, not a string. ' +
'If you are trying to set a theme from a file, it is now your (the ' +
'caller\'s) responsibility to require the file. The old syntax ' +
'looked like colors.setTheme(__dirname + ' +
'\'/../themes/generic-logging.js\'); The new syntax looks like '+
'colors.setTheme(require(__dirname + ' +
'\'/../themes/generic-logging.js\'));');
return;
}
for (var style in theme) {
(function(style) {
colors[style] = function(str) {
if (typeof theme[style] === 'object') {
var out = str;
for (var i in theme[style]) {
out = colors[theme[style][i]](out);
}
return out;
}
return colors[theme[style]](str);
};
})(style);
}
};
function init() {
var ret = {};
Object.keys(styles).forEach(function(name) {
ret[name] = {
get: function() {
return build([name]);
},
};
});
return ret;
}
var sequencer = function sequencer(map, str) {
var exploded = str.split('');
exploded = exploded.map(map);
return exploded.join('');
};
// custom formatter methods
colors.trap = require('./custom/trap');
colors.zalgo = require('./custom/zalgo');
// maps
colors.maps = {};
colors.maps.america = require('./maps/america')(colors);
colors.maps.zebra = require('./maps/zebra')(colors);
colors.maps.rainbow = require('./maps/rainbow')(colors);
colors.maps.random = require('./maps/random')(colors);
for (var map in colors.maps) {
(function(map) {
colors[map] = function(str) {
return sequencer(colors.maps[map], str);
};
})(map);
}
defineProps(colors, init());

View file

@ -0,0 +1,46 @@
module['exports'] = function runTheTrap(text, options) {
var result = '';
text = text || 'Run the trap, drop the bass';
text = text.split('');
var trap = {
a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'],
b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'],
c: ['\u00a9', '\u023b', '\u03fe'],
d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'],
e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc',
'\u0a6c'],
f: ['\u04fa'],
g: ['\u0262'],
h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'],
i: ['\u0f0f'],
j: ['\u0134'],
k: ['\u0138', '\u04a0', '\u04c3', '\u051e'],
l: ['\u0139'],
m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'],
n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'],
o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd',
'\u06dd', '\u0e4f'],
p: ['\u01f7', '\u048e'],
q: ['\u09cd'],
r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'],
s: ['\u00a7', '\u03de', '\u03df', '\u03e8'],
t: ['\u0141', '\u0166', '\u0373'],
u: ['\u01b1', '\u054d'],
v: ['\u05d8'],
w: ['\u0428', '\u0460', '\u047c', '\u0d70'],
x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'],
y: ['\u00a5', '\u04b0', '\u04cb'],
z: ['\u01b5', '\u0240'],
};
text.forEach(function(c) {
c = c.toLowerCase();
var chars = trap[c] || [' '];
var rand = Math.floor(Math.random() * chars.length);
if (typeof trap[c] !== 'undefined') {
result += trap[c][rand];
} else {
result += c;
}
});
return result;
};

View file

@ -0,0 +1,110 @@
// please no
module['exports'] = function zalgo(text, options) {
text = text || ' he is here ';
var soul = {
'up': [
'̍', '̎', '̄', '̅',
'̿', '̑', '̆', '̐',
'͒', '͗', '͑', '̇',
'̈', '̊', '͂', '̓',
'̈', '͊', '͋', '͌',
'̃', '̂', '̌', '͐',
'̀', '́', '̋', '̏',
'̒', '̓', '̔', '̽',
'̉', 'ͣ', 'ͤ', 'ͥ',
'ͦ', 'ͧ', 'ͨ', 'ͩ',
'ͪ', 'ͫ', 'ͬ', 'ͭ',
'ͮ', 'ͯ', '̾', '͛',
'͆', '̚',
],
'down': [
'̖', '̗', '̘', '̙',
'̜', '̝', '̞', '̟',
'̠', '̤', '̥', '̦',
'̩', '̪', '̫', '̬',
'̭', '̮', '̯', '̰',
'̱', '̲', '̳', '̹',
'̺', '̻', '̼', 'ͅ',
'͇', '͈', '͉', '͍',
'͎', '͓', '͔', '͕',
'͖', '͙', '͚', '̣',
],
'mid': [
'̕', '̛', '̀', '́',
'͘', '̡', '̢', '̧',
'̨', '̴', '̵', '̶',
'͜', '͝', '͞',
'͟', '͠', '͢', '̸',
'̷', '͡', ' ҉',
],
};
var all = [].concat(soul.up, soul.down, soul.mid);
function randomNumber(range) {
var r = Math.floor(Math.random() * range);
return r;
}
function isChar(character) {
var bool = false;
all.filter(function(i) {
bool = (i === character);
});
return bool;
}
function heComes(text, options) {
var result = '';
var counts;
var l;
options = options || {};
options['up'] =
typeof options['up'] !== 'undefined' ? options['up'] : true;
options['mid'] =
typeof options['mid'] !== 'undefined' ? options['mid'] : true;
options['down'] =
typeof options['down'] !== 'undefined' ? options['down'] : true;
options['size'] =
typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
text = text.split('');
for (l in text) {
if (isChar(l)) {
continue;
}
result = result + text[l];
counts = {'up': 0, 'down': 0, 'mid': 0};
switch (options.size) {
case 'mini':
counts.up = randomNumber(8);
counts.mid = randomNumber(2);
counts.down = randomNumber(8);
break;
case 'maxi':
counts.up = randomNumber(16) + 3;
counts.mid = randomNumber(4) + 1;
counts.down = randomNumber(64) + 3;
break;
default:
counts.up = randomNumber(8) + 1;
counts.mid = randomNumber(6) / 2;
counts.down = randomNumber(8) + 1;
break;
}
var arr = ['up', 'mid', 'down'];
for (var d in arr) {
var index = arr[d];
for (var i = 0; i <= counts[index]; i++) {
if (options[index]) {
result = result + soul[index][randomNumber(soul[index].length)];
}
}
}
}
return result;
}
// don't summon him
return heComes(text, options);
};

View file

@ -0,0 +1,110 @@
var colors = require('./colors');
module['exports'] = function() {
//
// Extends prototype of native string object to allow for "foo".red syntax
//
var addProperty = function(color, func) {
String.prototype.__defineGetter__(color, func);
};
addProperty('strip', function() {
return colors.strip(this);
});
addProperty('stripColors', function() {
return colors.strip(this);
});
addProperty('trap', function() {
return colors.trap(this);
});
addProperty('zalgo', function() {
return colors.zalgo(this);
});
addProperty('zebra', function() {
return colors.zebra(this);
});
addProperty('rainbow', function() {
return colors.rainbow(this);
});
addProperty('random', function() {
return colors.random(this);
});
addProperty('america', function() {
return colors.america(this);
});
//
// Iterate through all default styles and colors
//
var x = Object.keys(colors.styles);
x.forEach(function(style) {
addProperty(style, function() {
return colors.stylize(this, style);
});
});
function applyTheme(theme) {
//
// Remark: This is a list of methods that exist
// on String that you should not overwrite.
//
var stringPrototypeBlacklist = [
'__defineGetter__', '__defineSetter__', '__lookupGetter__',
'__lookupSetter__', 'charAt', 'constructor', 'hasOwnProperty',
'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString',
'valueOf', 'charCodeAt', 'indexOf', 'lastIndexOf', 'length',
'localeCompare', 'match', 'repeat', 'replace', 'search', 'slice',
'split', 'substring', 'toLocaleLowerCase', 'toLocaleUpperCase',
'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight',
];
Object.keys(theme).forEach(function(prop) {
if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
console.log('warn: '.red + ('String.prototype' + prop).magenta +
' is probably something you don\'t want to override. ' +
'Ignoring style name');
} else {
if (typeof(theme[prop]) === 'string') {
colors[prop] = colors[theme[prop]];
addProperty(prop, function() {
return colors[prop](this);
});
} else {
var themePropApplicator = function(str) {
var ret = str || this;
for (var t = 0; t < theme[prop].length; t++) {
ret = colors[theme[prop][t]](ret);
}
return ret;
};
addProperty(prop, themePropApplicator);
colors[prop] = function(str) {
return themePropApplicator(str);
};
}
}
});
}
colors.setTheme = function(theme) {
if (typeof theme === 'string') {
console.log('colors.setTheme now only accepts an object, not a string. ' +
'If you are trying to set a theme from a file, it is now your (the ' +
'caller\'s) responsibility to require the file. The old syntax ' +
'looked like colors.setTheme(__dirname + ' +
'\'/../themes/generic-logging.js\'); The new syntax looks like '+
'colors.setTheme(require(__dirname + ' +
'\'/../themes/generic-logging.js\'));');
return;
} else {
applyTheme(theme);
}
};
};

View file

@ -0,0 +1,13 @@
var colors = require('./colors');
module['exports'] = colors;
// Remark: By default, colors will add style properties to String.prototype.
//
// If you don't wish to extend String.prototype, you can do this instead and
// native String will not be touched:
//
// var colors = require('colors/safe);
// colors.red("foo")
//
//
require('./extendStringPrototype')();

View file

@ -0,0 +1,10 @@
module['exports'] = function(colors) {
return function(letter, i, exploded) {
if (letter === ' ') return letter;
switch (i%3) {
case 0: return colors.red(letter);
case 1: return colors.white(letter);
case 2: return colors.blue(letter);
}
};
};

View file

@ -0,0 +1,12 @@
module['exports'] = function(colors) {
// RoY G BiV
var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta'];
return function(letter, i, exploded) {
if (letter === ' ') {
return letter;
} else {
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
}
};
};

View file

@ -0,0 +1,11 @@
module['exports'] = function(colors) {
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',
'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];
return function(letter, i, exploded) {
return letter === ' ' ? letter :
colors[
available[Math.round(Math.random() * (available.length - 2))]
](letter);
};
};

View file

@ -0,0 +1,5 @@
module['exports'] = function(colors) {
return function(letter, i, exploded) {
return i % 2 === 0 ? letter : colors.inverse(letter);
};
};

View file

@ -0,0 +1,95 @@
/*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var styles = {};
module['exports'] = styles;
var codes = {
reset: [0, 0],
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29],
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
gray: [90, 39],
grey: [90, 39],
brightRed: [91, 39],
brightGreen: [92, 39],
brightYellow: [93, 39],
brightBlue: [94, 39],
brightMagenta: [95, 39],
brightCyan: [96, 39],
brightWhite: [97, 39],
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
bgGray: [100, 49],
bgGrey: [100, 49],
bgBrightRed: [101, 49],
bgBrightGreen: [102, 49],
bgBrightYellow: [103, 49],
bgBrightBlue: [104, 49],
bgBrightMagenta: [105, 49],
bgBrightCyan: [106, 49],
bgBrightWhite: [107, 49],
// legacy styles for colors pre v1.0.0
blackBG: [40, 49],
redBG: [41, 49],
greenBG: [42, 49],
yellowBG: [43, 49],
blueBG: [44, 49],
magentaBG: [45, 49],
cyanBG: [46, 49],
whiteBG: [47, 49],
};
Object.keys(codes).forEach(function(key) {
var val = codes[key];
var style = styles[key] = [];
style.open = '\u001b[' + val[0] + 'm';
style.close = '\u001b[' + val[1] + 'm';
});

View file

@ -0,0 +1,35 @@
/*
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use strict';
module.exports = function(flag, argv) {
argv = argv || process.argv;
var terminatorPos = argv.indexOf('--');
var prefix = /^-{1,2}/.test(flag) ? '' : '--';
var pos = argv.indexOf(prefix + flag);
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
};

View file

@ -0,0 +1,151 @@
/*
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
'use strict';
var os = require('os');
var hasFlag = require('./has-flag.js');
var env = process.env;
var forceColor = void 0;
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
forceColor = false;
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true')
|| hasFlag('color=always')) {
forceColor = true;
}
if ('FORCE_COLOR' in env) {
forceColor = env.FORCE_COLOR.length === 0
|| parseInt(env.FORCE_COLOR, 10) !== 0;
}
function translateLevel(level) {
if (level === 0) {
return false;
}
return {
level: level,
hasBasic: true,
has256: level >= 2,
has16m: level >= 3,
};
}
function supportsColor(stream) {
if (forceColor === false) {
return 0;
}
if (hasFlag('color=16m') || hasFlag('color=full')
|| hasFlag('color=truecolor')) {
return 3;
}
if (hasFlag('color=256')) {
return 2;
}
if (stream && !stream.isTTY && forceColor !== true) {
return 0;
}
var min = forceColor ? 1 : 0;
if (process.platform === 'win32') {
// Node.js 7.5.0 is the first version of Node.js to include a patch to
// libuv that enables 256 color output on Windows. Anything earlier and it
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
// release, and Node.js 7 is not. Windows 10 build 10586 is the first
// Windows release that supports 256 colors. Windows 10 build 14931 is the
// first release that supports 16m/TrueColor.
var osRelease = os.release().split('.');
if (Number(process.versions.node.split('.')[0]) >= 8
&& Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
return Number(osRelease[2]) >= 14931 ? 3 : 2;
}
return 1;
}
if ('CI' in env) {
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(function(sign) {
return sign in env;
}) || env.CI_NAME === 'codeship') {
return 1;
}
return min;
}
if ('TEAMCITY_VERSION' in env) {
return (/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0
);
}
if ('TERM_PROGRAM' in env) {
var version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
switch (env.TERM_PROGRAM) {
case 'iTerm.app':
return version >= 3 ? 3 : 2;
case 'Hyper':
return 3;
case 'Apple_Terminal':
return 2;
// No default
}
}
if (/-256(color)?$/i.test(env.TERM)) {
return 2;
}
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
return 1;
}
if ('COLORTERM' in env) {
return 1;
}
if (env.TERM === 'dumb') {
return min;
}
return min;
}
function getSupportLevel(stream) {
var level = supportsColor(stream);
return translateLevel(level);
}
module.exports = {
supportsColor: getSupportLevel,
stdout: getSupportLevel(process.stdout),
stderr: getSupportLevel(process.stderr),
};

View file

@ -0,0 +1,45 @@
{
"name": "colors",
"description": "get colors in your node.js console",
"version": "1.4.0",
"author": "Marak Squires",
"contributors": [
{
"name": "DABH",
"url": "https://github.com/DABH"
}
],
"homepage": "https://github.com/Marak/colors.js",
"bugs": "https://github.com/Marak/colors.js/issues",
"keywords": [
"ansi",
"terminal",
"colors"
],
"repository": {
"type": "git",
"url": "http://github.com/Marak/colors.js.git"
},
"license": "MIT",
"scripts": {
"lint": "eslint . --fix",
"test": "node tests/basic-test.js && node tests/safe-test.js"
},
"engines": {
"node": ">=0.1.90"
},
"main": "lib/index.js",
"files": [
"examples",
"lib",
"LICENSE",
"safe.js",
"themes",
"index.d.ts",
"safe.d.ts"
],
"devDependencies": {
"eslint": "^5.2.0",
"eslint-config-google": "^0.11.0"
}
}

View file

@ -0,0 +1,48 @@
// Type definitions for Colors.js 1.2
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Staffan Eketorp <https://github.com/staeke>
// Definitions: https://github.com/Marak/colors.js
export const enabled: boolean;
export function enable(): void;
export function disable(): void;
export function setTheme(theme: any): void;
export function strip(str: string): string;
export function stripColors(str: string): string;
export function black(str: string): string;
export function red(str: string): string;
export function green(str: string): string;
export function yellow(str: string): string;
export function blue(str: string): string;
export function magenta(str: string): string;
export function cyan(str: string): string;
export function white(str: string): string;
export function gray(str: string): string;
export function grey(str: string): string;
export function bgBlack(str: string): string;
export function bgRed(str: string): string;
export function bgGreen(str: string): string;
export function bgYellow(str: string): string;
export function bgBlue(str: string): string;
export function bgMagenta(str: string): string;
export function bgCyan(str: string): string;
export function bgWhite(str: string): string;
export function reset(str: string): string;
export function bold(str: string): string;
export function dim(str: string): string;
export function italic(str: string): string;
export function underline(str: string): string;
export function inverse(str: string): string;
export function hidden(str: string): string;
export function strikethrough(str: string): string;
export function rainbow(str: string): string;
export function zebra(str: string): string;
export function america(str: string): string;
export function trap(str: string): string;
export function random(str: string): string;
export function zalgo(str: string): string;

View file

@ -0,0 +1,10 @@
//
// Remark: Requiring this file will use the "safe" colors API,
// which will not touch String.prototype.
//
// var colors = require('colors/safe');
// colors.red("foo")
//
//
var colors = require('./lib/colors');
module['exports'] = colors;

View file

@ -0,0 +1,12 @@
module['exports'] = {
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',
warn: 'yellow',
debug: 'blue',
error: 'red',
};

62
node_modules/jasmine-spec-reporter/package.json generated vendored Normal file
View file

@ -0,0 +1,62 @@
{
"name": "jasmine-spec-reporter",
"version": "6.0.0",
"description": "Spec reporter for jasmine behavior-driven development framework",
"main": "built/main.js",
"types": "built/main.d.ts",
"scripts": {
"prepare": "tsc",
"pretest": "tsc && tsc -p spec/tsconfig.json",
"test": "jasmine",
"test:integration": "npm run pretest && npm run examples:update && jasmine --config=spec/support/jasmine-integration.json",
"posttest": "npm run lint",
"lint": "tslint -c tslint.json --project tsconfig.json && tslint -c tslint.json --project spec/tsconfig.json",
"examples:update": "npm run examples:update:node && npm run examples:update:protractor && npm run examples:update:typescript",
"examples:update:node": "cd examples/node && npm install --no-package-lock",
"examples:update:protractor": "cd examples/protractor && npm install --no-package-lock",
"examples:update:typescript": "cd examples/typescript && npm install --no-package-lock",
"examples:test:node": "cd examples/node && npm test",
"examples:test:protractor": "cd examples/protractor && npm test",
"examples:test:typescript": "cd examples/typescript && npm test",
"coverage": "nyc npm test",
"coverage:codecov": "npm run coverage && nyc report --reporter=json && codecov -f coverage/*.json"
},
"nyc": {
"exclude": [
"spec"
]
},
"repository": {
"type": "git",
"url": "https://github.com/bcaudan/jasmine-spec-reporter"
},
"keywords": [
"jasmine",
"reporter",
"bdd",
"spec",
"protractor"
],
"author": "Bastien Caudan",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/bcaudan/jasmine-spec-reporter/issues"
},
"homepage": "https://github.com/bcaudan/jasmine-spec-reporter",
"dependencies": {
"colors": "1.4.0"
},
"devDependencies": {
"@types/jasmine": "3.5.14",
"@types/node": "14.11.1",
"codecov": "3.7.2",
"diff": "4.0.2",
"jasmine": "3.6.1",
"jasmine-core": "3.6.0",
"nyc": "15.1.0",
"protractor": "7.0.0",
"tslint": "6.1.3",
"tslint-eslint-rules": "5.4.0",
"typescript": "3.9.7"
}
}

BIN
node_modules/jasmine-spec-reporter/screenshot.gif generated vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB