Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

## RobotlegsJS-SignalCommandMap 0.2.0

### v0.2.1

- Update `karma` setup to generate code coverage report only for `src` folder (see #69).

- Update dev dependencies to latest version.

### [v0.2.0](https://github.com/RobotlegsJS/RobotlegsJS-SignalCommandMap/releases/tag/0.2.0) - 2018-08-02

- Update @robotlegsjs/core to version 0.2.0 (see #67).
Expand Down
3 changes: 2 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ module.exports = config => {
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: []
browsers: [],
browserNoActivityTimeout: 50000
};

if (process.env.TRAVIS) {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"imports-loader": "^0.8.0",
"istanbul": "^0.4.5",
"istanbul-instrumenter-loader": "^3.0.1",
"karma": "^2.0.5",
"karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.1",
Expand All @@ -98,20 +98,20 @@
"karma-webpack": "^3.0.0",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"prettier": "^1.14.0",
"prettier": "^1.14.2",
"publish-please": "^3.2.0",
"reflect-metadata": "^0.1.12",
"remap-istanbul": "^0.11.1",
"rimraf": "^2.6.2",
"sinon": "^6.1.4",
"sinon": "^5.1.1",
"sinon-chai": "^3.2.0",
"source-map-support": "^0.5.6",
"source-map-support": "^0.5.8",
"ts-loader": "^4.4.2",
"ts-node": "^7.0.0",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.14.0",
"typescript": "^3.0.1",
"webpack": "^4.16.4",
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
},
Expand Down
6 changes: 3 additions & 3 deletions test/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
/// <reference types="mocha" />

import "reflect-metadata";
import "bluebird";
import "es6-symbol";
import "es6-map";
import "bluebird/js/browser/bluebird";
import "es6-symbol/implement";
import "es6-map/implement";
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ import { ISignal, Signal } from "@robotlegsjs/signals";

import { IContext, ICommandMapper, Context, CommandMapper } from "@robotlegsjs/core";

import { SignalCommandMapExtension } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/SignalCommandMapExtension";
import { SignalCommandMap } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/impl/SignalCommandMap";

import { NullCommand } from "../support/NullCommand";

describe("SignalCommandMap", () => {
let extension: SignalCommandMapExtension;
let signal: ISignal;
let context: IContext;
let subject: SignalCommandMap;

beforeEach(() => {
extension = new SignalCommandMapExtension();
signal = new Signal();
context = new Context();
subject = new SignalCommandMap(context);
Expand All @@ -33,11 +36,16 @@ describe("SignalCommandMap", () => {
if (context.initialized) {
context.destroy();
}
extension = null;
signal = null;
context = null;
subject = null;
});

it("extension_is_added", () => {
assert.isNotNull(extension);
});

it("map_creates_mapper", () => {
let mapper: any = subject.map(Signal);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { assert } from "chai";

import { IContext, IInjector, Context } from "@robotlegsjs/core";

import { SignalCommandMapExtension } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/SignalCommandMapExtension";
import { ISignalCommandMap } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/api/ISignalCommandMap";
import { SignalCommandMap } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/impl/SignalCommandMap";

Expand All @@ -34,6 +35,7 @@ import { SupportSignal } from "../support/SupportSignal";
import { SupportSignal2 } from "../support/SupportSignal2";

describe("SignalCommandMap", () => {
let extension: SignalCommandMapExtension;
let context: IContext;
let injector: IInjector;
let signalCommandMap: SignalCommandMap;
Expand Down Expand Up @@ -120,6 +122,7 @@ describe("SignalCommandMap", () => {
}

beforeEach(() => {
extension = new SignalCommandMapExtension();
context = new Context();
injector = context.injector;
signalCommandMap = new SignalCommandMap(context);
Expand All @@ -134,11 +137,16 @@ describe("SignalCommandMap", () => {
if (context.initialized) {
context.destroy();
}
extension = null;
context = null;
injector = null;
signalCommandMap = null;
});

it("extension_is_added", () => {
assert.isNotNull(extension);
});

it("test_command_executes_successfully", () => {
assert.equal(commandExecutionCount(1), 1);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ISignal, Signal } from "@robotlegsjs/signals";

import { IInjector, RobotlegsInjector, CommandMapper } from "@robotlegsjs/core";

import { SignalCommandMapExtension } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/SignalCommandMapExtension";
import { SignalCommandTrigger } from "../../../../../../src/robotlegs/bender/extensions/signalCommandMap/impl/SignalCommandTrigger";

import { CallbackCommand } from "../support/CallbackCommand";
Expand All @@ -23,11 +24,13 @@ import { NullCommand } from "../support/NullCommand";
import { ParametersSignal } from "../support/ParametersSignal";

describe("SignalCommandTrigger", () => {
let extension: SignalCommandMapExtension;
let signal: Signal;
let injector: IInjector;
let subject: SignalCommandTrigger;

beforeEach(() => {
extension = new SignalCommandMapExtension();
signal = new Signal();
injector = new RobotlegsInjector();
subject = new SignalCommandTrigger(injector, Signal);
Expand All @@ -38,6 +41,11 @@ describe("SignalCommandTrigger", () => {
signal = null;
injector = null;
subject = null;
extension = null;
});

it("extension_is_added", () => {
assert.isNotNull(extension);
});

it("createMapper_returns_a_command_mapper", () => {
Expand Down
3 changes: 3 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.test.json"
}
3 changes: 2 additions & 1 deletion tslint.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"./tslint.json"
],
"rules": {
"no-implicit-dependencies": [true, "dev"]
"no-implicit-dependencies": [true, "dev"],
"no-submodule-imports": false
}
}
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = env => {
{
test: ((env.production) /* disable this loader for production builds */
? /^$/
: /^(.(?!\.test))*\.ts$/),
: /^.*(src).*\.ts$/),
loader: "istanbul-instrumenter-loader",
query: {
embedSource: true
Expand Down
Loading