Skip to content

Commit

Permalink
Added InMemoryActor TypeScript test.
Browse files Browse the repository at this point in the history
  • Loading branch information
weekens committed Jul 28, 2017
1 parent 3628c17 commit 39a9e0f
Show file tree
Hide file tree
Showing 18 changed files with 10,369 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ module.exports = function(grunt) {
},
target: [
'**/*.ts',
'!**/node_modules/**'
'!**/node_modules/**',
'!typings/**'
]
}
});
Expand Down
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export interface Logger {
}

export interface Actor {
getId(): string;

getName(): string;

getLog(): Logger;

getParent(): Actor;
Expand All @@ -33,6 +37,12 @@ export interface Actor {
sendAndReceive(topic: string, ...message: any[]): Promise<any>;

forwardToParent(...topics: Array<string|RegExp>): void;

forwardToChild(child: Actor, ...topics: Array<string|RegExp>): void;

metrics(): Promise<Object>;

destroy(): Promise<void>;
}

export interface ActorDefinition {
Expand Down
8 changes: 8 additions & 0 deletions lib/utils/test.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2016-2017 Untu, Inc.
* This code is licensed under Eclipse Public License - v 1.0.
* The full license text can be found in LICENSE.txt file and
* on the Eclipse official site (https://www.eclipse.org/legal/epl-v10.html).
*/

export function logStub(): Object;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"scripts": {
"validate": "grunt validate",
"test": "mocha -R spec --recursive --timeout 20000",
"test": "mocha -R spec --recursive --timeout 20000 --require ts-node/register --compilers ts:typescript",
"coverage": "nyc --reporter=lcov npm test",
"docs": "markdown-toc -i README.md",
"version": "npm run docs",
Expand Down
Loading

0 comments on commit 39a9e0f

Please sign in to comment.